From bc2ef3ece6ffa9841adbb1abb2408e51aa519562 Mon Sep 17 00:00:00 2001 From: chocolatemintychip <165883340+chocolatemintychip@users.noreply.github.com> Date: Mon, 20 Apr 2026 01:33:20 +0200 Subject: [PATCH] ssd: fix theming issues with the button --- src/theme.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/src/theme.c b/src/theme.c index d627cc47..50b80a54 100644 --- a/src/theme.c +++ b/src/theme.c @@ -316,15 +316,13 @@ load_buttons(struct theme *theme) .type = LAB_NODE_BUTTON_OMNIPRESENT, .state_set = LAB_BS_TOGGLED, }, { - - // TODO Add proper bitmaps .name = "ontop", - .fallback_button = (const char[]){ 0x33, 0x33, 0x00, 0x00, 0x33, 0x33 }, + .fallback_button = (const char[]){ 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c }, .type = LAB_NODE_BUTTON_ONTOP, .state_set = 0, }, { .name = "ontop_toggled", - .fallback_button = (const char[]){ 0x33, 0x3f, 0x1e, 0x1e, 0x3f, 0x33 }, + .fallback_button = (const char[]){ 0x00, 0x0c, 0x1e, 0x33, 0x21, 0x00 }, .type = LAB_NODE_BUTTON_ONTOP, .state_set = LAB_BS_TOGGLED, }, { @@ -375,6 +373,17 @@ load_buttons(struct theme *theme) .type = LAB_NODE_BUTTON_OMNIPRESENT, .state_set = LAB_BS_TOGGLED | LAB_BS_HOVERED, /* no fallback (non-hover variant is used instead) */ + }, { + .name = "ontop_hover", + /* no fallback (non-hover variant is used instead) */ + .type = LAB_NODE_BUTTON_ONTOP, + .state_set = LAB_BS_HOVERED, + }, { + .name = "ontop_toggled_hover", + .alt_name = "ontop_hover_toggled", + .type = LAB_NODE_BUTTON_ONTOP, + .state_set = LAB_BS_TOGGLED | LAB_BS_HOVERED, + /* no fallback (non-hover variant is used instead) */ }, { .name = "close_hover", .type = LAB_NODE_BUTTON_CLOSE, @@ -848,6 +857,10 @@ entry(struct theme *theme, const char *key, const char *value) parse_color(value, theme->window[SSD_ACTIVE] .button_colors[LAB_NODE_BUTTON_OMNIPRESENT]); } + if (match_glob(key, "window.active.button.ontop.unpressed.image.color")) { + parse_color(value, theme->window[SSD_ACTIVE] + .button_colors[LAB_NODE_BUTTON_ONTOP]); + } if (match_glob(key, "window.active.button.close.unpressed.image.color")) { parse_color(value, theme->window[SSD_ACTIVE] .button_colors[LAB_NODE_BUTTON_CLOSE]); @@ -874,6 +887,10 @@ entry(struct theme *theme, const char *key, const char *value) parse_color(value, theme->window[SSD_INACTIVE] .button_colors[LAB_NODE_BUTTON_OMNIPRESENT]); } + if (match_glob(key, "window.inactive.button.ontop.unpressed.image.color")) { + parse_color(value, theme->window[SSD_INACTIVE] + .button_colors[LAB_NODE_BUTTON_ONTOP]); + } if (match_glob(key, "window.inactive.button.close.unpressed.image.color")) { parse_color(value, theme->window[SSD_INACTIVE] .button_colors[LAB_NODE_BUTTON_CLOSE]);