Merge pull request #3790 from mireq/fix-layoutbox-rendering
Layoutbox rendering is blurry on HiDPI screen
This commit is contained in:
commit
b13ac3e34d
|
@ -15,7 +15,6 @@ local layout = require("awful.layout")
|
||||||
local tooltip = require("awful.tooltip")
|
local tooltip = require("awful.tooltip")
|
||||||
local beautiful = require("beautiful")
|
local beautiful = require("beautiful")
|
||||||
local wibox = require("wibox")
|
local wibox = require("wibox")
|
||||||
local surface = require("gears.surface")
|
|
||||||
local gdebug = require("gears.debug")
|
local gdebug = require("gears.debug")
|
||||||
local gtable = require("gears.table")
|
local gtable = require("gears.table")
|
||||||
|
|
||||||
|
@ -32,9 +31,13 @@ local function update(w, screen)
|
||||||
local name = layout.getname(layout.get(screen))
|
local name = layout.getname(layout.get(screen))
|
||||||
w._layoutbox_tooltip:set_text(name or "[no name]")
|
w._layoutbox_tooltip:set_text(name or "[no name]")
|
||||||
|
|
||||||
local img = surface.load_silently(beautiful["layout_" .. name], false)
|
local image_name = "layout_" .. name
|
||||||
w.imagebox.image = img
|
local theme_image = beautiful[image_name]
|
||||||
w.textbox.text = img and "" or name
|
local success = false
|
||||||
|
if theme_image ~= nil then
|
||||||
|
success = w.imagebox:set_image(beautiful[image_name])
|
||||||
|
end
|
||||||
|
w.textbox.text = success and "" or name
|
||||||
end
|
end
|
||||||
|
|
||||||
local function update_from_tag(t)
|
local function update_from_tag(t)
|
||||||
|
|
Loading…
Reference in New Issue