mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
theme: fix spelling of LAB_BS_HOVERED
This commit is contained in:
parent
98c77cd6a7
commit
502473f343
3 changed files with 16 additions and 16 deletions
|
|
@ -41,11 +41,11 @@ struct theme_snapping_overlay {
|
||||||
enum lab_button_state {
|
enum lab_button_state {
|
||||||
LAB_BS_DEFAULT = 0,
|
LAB_BS_DEFAULT = 0,
|
||||||
|
|
||||||
LAB_BS_HOVERD = 1 << 0,
|
LAB_BS_HOVERED = 1 << 0,
|
||||||
LAB_BS_TOGGLED = 1 << 1,
|
LAB_BS_TOGGLED = 1 << 1,
|
||||||
LAB_BS_ROUNDED = 1 << 2,
|
LAB_BS_ROUNDED = 1 << 2,
|
||||||
|
|
||||||
LAB_BS_ALL = LAB_BS_HOVERD | LAB_BS_TOGGLED | LAB_BS_ROUNDED,
|
LAB_BS_ALL = LAB_BS_HOVERED | LAB_BS_TOGGLED | LAB_BS_ROUNDED,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct theme_background {
|
struct theme_background {
|
||||||
|
|
@ -104,7 +104,7 @@ struct theme {
|
||||||
* The texture of a window buttons for each hover/toggled/rounded
|
* The texture of a window buttons for each hover/toggled/rounded
|
||||||
* state. This can be accessed like:
|
* state. This can be accessed like:
|
||||||
*
|
*
|
||||||
* buttons[LAB_SSD_BUTTON_ICONIFY][LAB_BS_HOVERD | LAB_BS_TOGGLED]
|
* buttons[LAB_SSD_BUTTON_ICONIFY][LAB_BS_HOVERED | LAB_BS_TOGGLED]
|
||||||
*
|
*
|
||||||
* Elements in buttons[0] are all NULL since LAB_SSD_BUTTON_FIRST is 1.
|
* Elements in buttons[0] are all NULL since LAB_SSD_BUTTON_FIRST is 1.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -510,12 +510,12 @@ ssd_update_button_hover(struct wlr_scene_node *node,
|
||||||
|
|
||||||
/* Disable old hover */
|
/* Disable old hover */
|
||||||
if (hover_state->button) {
|
if (hover_state->button) {
|
||||||
update_button_state(hover_state->button, LAB_BS_HOVERD, false);
|
update_button_state(hover_state->button, LAB_BS_HOVERED, false);
|
||||||
hover_state->view = NULL;
|
hover_state->view = NULL;
|
||||||
hover_state->button = NULL;
|
hover_state->button = NULL;
|
||||||
}
|
}
|
||||||
if (button) {
|
if (button) {
|
||||||
update_button_state(button, LAB_BS_HOVERD, true);
|
update_button_state(button, LAB_BS_HOVERED, true);
|
||||||
hover_state->view = button->base.view;
|
hover_state->view = button->base.view;
|
||||||
hover_state->button = button;
|
hover_state->button = button;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
22
src/theme.c
22
src/theme.c
|
|
@ -217,9 +217,9 @@ load_button(struct theme *theme, struct button *b, int active)
|
||||||
* If hover-icons do not exist, add fallbacks by copying the non-hover
|
* If hover-icons do not exist, add fallbacks by copying the non-hover
|
||||||
* variant and then adding an overlay.
|
* variant and then adding an overlay.
|
||||||
*/
|
*/
|
||||||
if (!*img && (b->state_set & LAB_BS_HOVERD)) {
|
if (!*img && (b->state_set & LAB_BS_HOVERED)) {
|
||||||
struct lab_img *non_hover_img =
|
struct lab_img *non_hover_img =
|
||||||
button_imgs[b->type][b->state_set & ~LAB_BS_HOVERD];
|
button_imgs[b->type][b->state_set & ~LAB_BS_HOVERED];
|
||||||
*img = lab_img_copy(non_hover_img);
|
*img = lab_img_copy(non_hover_img);
|
||||||
lab_img_add_modifier(*img,
|
lab_img_add_modifier(*img,
|
||||||
draw_hover_overlay_on_button);
|
draw_hover_overlay_on_button);
|
||||||
|
|
@ -335,50 +335,50 @@ load_buttons(struct theme *theme)
|
||||||
}, {
|
}, {
|
||||||
.name = "menu_hover",
|
.name = "menu_hover",
|
||||||
.type = LAB_SSD_BUTTON_WINDOW_MENU,
|
.type = LAB_SSD_BUTTON_WINDOW_MENU,
|
||||||
.state_set = LAB_BS_HOVERD,
|
.state_set = LAB_BS_HOVERED,
|
||||||
/* no fallback (non-hover variant is used instead) */
|
/* no fallback (non-hover variant is used instead) */
|
||||||
}, {
|
}, {
|
||||||
.name = "iconify_hover",
|
.name = "iconify_hover",
|
||||||
.type = LAB_SSD_BUTTON_ICONIFY,
|
.type = LAB_SSD_BUTTON_ICONIFY,
|
||||||
.state_set = LAB_BS_HOVERD,
|
.state_set = LAB_BS_HOVERED,
|
||||||
/* no fallback (non-hover variant is used instead) */
|
/* no fallback (non-hover variant is used instead) */
|
||||||
}, {
|
}, {
|
||||||
.name = "max_hover",
|
.name = "max_hover",
|
||||||
.type = LAB_SSD_BUTTON_MAXIMIZE,
|
.type = LAB_SSD_BUTTON_MAXIMIZE,
|
||||||
.state_set = LAB_BS_HOVERD,
|
.state_set = LAB_BS_HOVERED,
|
||||||
/* no fallback (non-hover variant is used instead) */
|
/* no fallback (non-hover variant is used instead) */
|
||||||
}, {
|
}, {
|
||||||
.name = "max_toggled_hover",
|
.name = "max_toggled_hover",
|
||||||
.alt_name = "max_hover_toggled",
|
.alt_name = "max_hover_toggled",
|
||||||
.type = LAB_SSD_BUTTON_MAXIMIZE,
|
.type = LAB_SSD_BUTTON_MAXIMIZE,
|
||||||
.state_set = LAB_BS_TOGGLED | LAB_BS_HOVERD,
|
.state_set = LAB_BS_TOGGLED | LAB_BS_HOVERED,
|
||||||
/* no fallback (non-hover variant is used instead) */
|
/* no fallback (non-hover variant is used instead) */
|
||||||
}, {
|
}, {
|
||||||
.name = "shade_hover",
|
.name = "shade_hover",
|
||||||
.type = LAB_SSD_BUTTON_SHADE,
|
.type = LAB_SSD_BUTTON_SHADE,
|
||||||
.state_set = LAB_BS_HOVERD,
|
.state_set = LAB_BS_HOVERED,
|
||||||
/* no fallback (non-hover variant is used instead) */
|
/* no fallback (non-hover variant is used instead) */
|
||||||
}, {
|
}, {
|
||||||
.name = "shade_toggled_hover",
|
.name = "shade_toggled_hover",
|
||||||
.alt_name = "shade_hover_toggled",
|
.alt_name = "shade_hover_toggled",
|
||||||
.type = LAB_SSD_BUTTON_SHADE,
|
.type = LAB_SSD_BUTTON_SHADE,
|
||||||
.state_set = LAB_BS_TOGGLED | LAB_BS_HOVERD,
|
.state_set = LAB_BS_TOGGLED | LAB_BS_HOVERED,
|
||||||
/* no fallback (non-hover variant is used instead) */
|
/* no fallback (non-hover variant is used instead) */
|
||||||
}, {
|
}, {
|
||||||
.name = "desk_hover",
|
.name = "desk_hover",
|
||||||
/* no fallback (non-hover variant is used instead) */
|
/* no fallback (non-hover variant is used instead) */
|
||||||
.type = LAB_SSD_BUTTON_OMNIPRESENT,
|
.type = LAB_SSD_BUTTON_OMNIPRESENT,
|
||||||
.state_set = LAB_BS_HOVERD,
|
.state_set = LAB_BS_HOVERED,
|
||||||
}, {
|
}, {
|
||||||
.name = "desk_toggled_hover",
|
.name = "desk_toggled_hover",
|
||||||
.alt_name = "desk_hover_toggled",
|
.alt_name = "desk_hover_toggled",
|
||||||
.type = LAB_SSD_BUTTON_OMNIPRESENT,
|
.type = LAB_SSD_BUTTON_OMNIPRESENT,
|
||||||
.state_set = LAB_BS_TOGGLED | LAB_BS_HOVERD,
|
.state_set = LAB_BS_TOGGLED | LAB_BS_HOVERED,
|
||||||
/* no fallback (non-hover variant is used instead) */
|
/* no fallback (non-hover variant is used instead) */
|
||||||
}, {
|
}, {
|
||||||
.name = "close_hover",
|
.name = "close_hover",
|
||||||
.type = LAB_SSD_BUTTON_CLOSE,
|
.type = LAB_SSD_BUTTON_CLOSE,
|
||||||
.state_set = LAB_BS_HOVERD,
|
.state_set = LAB_BS_HOVERED,
|
||||||
/* no fallback (non-hover variant is used instead) */
|
/* no fallback (non-hover variant is used instead) */
|
||||||
}, };
|
}, };
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue