Skip to content

Commit

Permalink
Merge pull request #3790 from mireq/fix-layoutbox-rendering
Browse files Browse the repository at this point in the history
Layoutbox rendering is blurry on HiDPI screen
  • Loading branch information
mergify[bot] authored May 16, 2023
2 parents 449b00b + b642166 commit b13ac3e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib/awful/widget/layoutbox.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ local layout = require("awful.layout")
local tooltip = require("awful.tooltip")
local beautiful = require("beautiful")
local wibox = require("wibox")
local surface = require("gears.surface")
local gdebug = require("gears.debug")
local gtable = require("gears.table")

Expand All @@ -32,9 +31,13 @@ local function update(w, screen)
local name = layout.getname(layout.get(screen))
w._layoutbox_tooltip:set_text(name or "[no name]")

local img = surface.load_silently(beautiful["layout_" .. name], false)
w.imagebox.image = img
w.textbox.text = img and "" or name
local image_name = "layout_" .. name
local theme_image = beautiful[image_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

local function update_from_tag(t)
Expand Down

0 comments on commit b13ac3e

Please sign in to comment.