]> git.mdlowis.com Git - proto/labwc.git/commitdiff
theme: Rename separator_width to separator_line_thickness
authorConsolatis <35009135+Consolatis@users.noreply.github.com>
Tue, 6 Dec 2022 11:01:44 +0000 (12:01 +0100)
committerJohan Malm <johanmalm@users.noreply.github.com>
Tue, 6 Dec 2022 21:08:43 +0000 (21:08 +0000)
include/theme.h
src/menu/menu.c
src/theme.c

index 9955e0d0c5cb20a3b328c734e0e9190a197f901e..d869234969faa5282c6511b7da49ca2a37623277 100644 (file)
@@ -50,7 +50,7 @@ struct theme {
        float menu_items_active_bg_color[4];
        float menu_items_active_text_color[4];
 
-       int menu_separator_width;
+       int menu_separator_line_thickness;
        int menu_separator_padding_width;
        int menu_separator_padding_height;
        float menu_separator_color[4];
index ce9f39eb0a809156326e5d821415ae9f91d964d3..b27c6331a5eade1bece2541347ad2752398d8d8d 100644 (file)
@@ -166,7 +166,7 @@ separator_create(struct menu *menu, const char *label)
        menuitem->selectable = false;
        struct server *server = menu->server;
        struct theme *theme = server->theme;
-       menuitem->height = theme->menu_separator_width +
+       menuitem->height = theme->menu_separator_line_thickness +
                        2 * theme->menu_separator_padding_height;
 
        menuitem->tree = wlr_scene_tree_create(menu->scene_tree);
@@ -178,12 +178,11 @@ separator_create(struct menu *menu, const char *label)
                MENUWIDTH, menuitem->height,
                theme->menu_items_bg_color)->node;
 
-       /* theme->menu_separator_width is the line-thickness (so height here) */
        int width = MENUWIDTH - 2 * theme->menu_separator_padding_width;
        menuitem->normal.text = &wlr_scene_rect_create(
                menuitem->normal.tree,
                width > 0 ? width : 0,
-               theme->menu_separator_width,
+               theme->menu_separator_line_thickness,
                theme->menu_separator_color)->node;
 
        wlr_scene_node_set_position(&menuitem->tree->node, 0, menu->size.height);
index 29d4fe18b3aaf24ec8fba3aed82ab6df04e4ccc1..f56ba8e5daf9ae4faa51b21e8d3f707ab02b7fd3 100644 (file)
@@ -128,7 +128,7 @@ theme_builtin(struct theme *theme)
        parse_hexstr("#dddad6", theme->menu_items_active_bg_color);
        parse_hexstr("#000000", theme->menu_items_active_text_color);
 
-       theme->menu_separator_width = 1;
+       theme->menu_separator_line_thickness = 1;
        theme->menu_separator_padding_width = 6;
        theme->menu_separator_padding_height = 3;
        parse_hexstr("#888888", theme->menu_separator_color);
@@ -265,7 +265,7 @@ entry(struct theme *theme, const char *key, const char *value)
        }
 
        if (match(key, "menu.separator.width")) {
-               theme->menu_separator_width = atoi(value);
+               theme->menu_separator_line_thickness = atoi(value);
        }
        if (match(key, "menu.separator.padding.width")) {
                theme->menu_separator_padding_width = atoi(value);