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 {
|
||||
LAB_BS_DEFAULT = 0,
|
||||
|
||||
LAB_BS_HOVERD = 1 << 0,
|
||||
LAB_BS_HOVERED = 1 << 0,
|
||||
LAB_BS_TOGGLED = 1 << 1,
|
||||
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 {
|
||||
|
|
@ -104,7 +104,7 @@ struct theme {
|
|||
* The texture of a window buttons for each hover/toggled/rounded
|
||||
* 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.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -510,12 +510,12 @@ ssd_update_button_hover(struct wlr_scene_node *node,
|
|||
|
||||
/* Disable old hover */
|
||||
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->button = NULL;
|
||||
}
|
||||
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->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
|
||||
* 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 =
|
||||
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);
|
||||
lab_img_add_modifier(*img,
|
||||
draw_hover_overlay_on_button);
|
||||
|
|
@ -335,50 +335,50 @@ load_buttons(struct theme *theme)
|
|||
}, {
|
||||
.name = "menu_hover",
|
||||
.type = LAB_SSD_BUTTON_WINDOW_MENU,
|
||||
.state_set = LAB_BS_HOVERD,
|
||||
.state_set = LAB_BS_HOVERED,
|
||||
/* no fallback (non-hover variant is used instead) */
|
||||
}, {
|
||||
.name = "iconify_hover",
|
||||
.type = LAB_SSD_BUTTON_ICONIFY,
|
||||
.state_set = LAB_BS_HOVERD,
|
||||
.state_set = LAB_BS_HOVERED,
|
||||
/* no fallback (non-hover variant is used instead) */
|
||||
}, {
|
||||
.name = "max_hover",
|
||||
.type = LAB_SSD_BUTTON_MAXIMIZE,
|
||||
.state_set = LAB_BS_HOVERD,
|
||||
.state_set = LAB_BS_HOVERED,
|
||||
/* no fallback (non-hover variant is used instead) */
|
||||
}, {
|
||||
.name = "max_toggled_hover",
|
||||
.alt_name = "max_hover_toggled",
|
||||
.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) */
|
||||
}, {
|
||||
.name = "shade_hover",
|
||||
.type = LAB_SSD_BUTTON_SHADE,
|
||||
.state_set = LAB_BS_HOVERD,
|
||||
.state_set = LAB_BS_HOVERED,
|
||||
/* no fallback (non-hover variant is used instead) */
|
||||
}, {
|
||||
.name = "shade_toggled_hover",
|
||||
.alt_name = "shade_hover_toggled",
|
||||
.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) */
|
||||
}, {
|
||||
.name = "desk_hover",
|
||||
/* no fallback (non-hover variant is used instead) */
|
||||
.type = LAB_SSD_BUTTON_OMNIPRESENT,
|
||||
.state_set = LAB_BS_HOVERD,
|
||||
.state_set = LAB_BS_HOVERED,
|
||||
}, {
|
||||
.name = "desk_toggled_hover",
|
||||
.alt_name = "desk_hover_toggled",
|
||||
.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) */
|
||||
}, {
|
||||
.name = "close_hover",
|
||||
.type = LAB_SSD_BUTTON_CLOSE,
|
||||
.state_set = LAB_BS_HOVERD,
|
||||
.state_set = LAB_BS_HOVERED,
|
||||
/* no fallback (non-hover variant is used instead) */
|
||||
}, };
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue