mirror of
https://github.com/labwc/labwc.git
synced 2026-06-13 14:33:18 -04:00
ssd: fix theming issues with the button
This commit is contained in:
parent
0aaf7d3cb9
commit
bc2ef3ece6
1 changed files with 21 additions and 4 deletions
25
src/theme.c
25
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]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue