From eccf35fa23f2f92e1f578f6182ba87db8a1934e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bend=C3=ADk?= Date: Sun, 26 Mar 2023 07:45:30 +0200 Subject: [PATCH 1/4] Fixed blurry rendering of layoutbox --- lib/awful/widget/layoutbox.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/awful/widget/layoutbox.lua b/lib/awful/widget/layoutbox.lua index a25a74c46f..dd0a35927b 100644 --- a/lib/awful/widget/layoutbox.lua +++ b/lib/awful/widget/layoutbox.lua @@ -33,7 +33,9 @@ local function update(w, screen) w._layoutbox_tooltip:set_text(name or "[no name]") local img = surface.load_silently(beautiful["layout_" .. name], false) - w.imagebox.image = img + if img then + w.imagebox:set_image(beautiful["layout_" .. name]) + end w.textbox.text = img and "" or name end From bca49ce40828a9a387529bdab6edec34f5ce994b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bend=C3=ADk?= Date: Sun, 26 Mar 2023 07:58:15 +0200 Subject: [PATCH 2/4] Whitespace --- lib/awful/widget/layoutbox.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/awful/widget/layoutbox.lua b/lib/awful/widget/layoutbox.lua index dd0a35927b..72eef61e09 100644 --- a/lib/awful/widget/layoutbox.lua +++ b/lib/awful/widget/layoutbox.lua @@ -36,7 +36,7 @@ local function update(w, screen) if img then w.imagebox:set_image(beautiful["layout_" .. name]) end - w.textbox.text = img and "" or name + w.textbox.text = img and "" or name end local function update_from_tag(t) From a03aaec1dccdd84b27fa0a99ce08616dca754ba9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bend=C3=ADk?= Date: Sun, 26 Mar 2023 08:09:39 +0200 Subject: [PATCH 3/4] Variation without load_silently --- lib/awful/widget/layoutbox.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/awful/widget/layoutbox.lua b/lib/awful/widget/layoutbox.lua index 72eef61e09..b1e21e6b74 100644 --- a/lib/awful/widget/layoutbox.lua +++ b/lib/awful/widget/layoutbox.lua @@ -32,11 +32,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) - if img then - w.imagebox:set_image(beautiful["layout_" .. 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 = img and "" or name + w.textbox.text = success and "" or name end local function update_from_tag(t) From b6421667d9f09e8dd840cdeb06cb06be02d0b9ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bend=C3=ADk?= Date: Sat, 13 May 2023 07:22:06 +0200 Subject: [PATCH 4/4] Removed unused require --- lib/awful/widget/layoutbox.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/awful/widget/layoutbox.lua b/lib/awful/widget/layoutbox.lua index b1e21e6b74..d38dab9fe1 100644 --- a/lib/awful/widget/layoutbox.lua +++ b/lib/awful/widget/layoutbox.lua @@ -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")