From: Tomi Ollila Date: Thu, 31 Oct 2024 18:26:32 +0000 (+0200) Subject: menu: use only menu_separator_padding_width to pad separators w/o label X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=f052eaea6f3fa4b97fd453cb528084541be044b0;p=proto%2Flabwc.git menu: use only menu_separator_padding_width to pad separators w/o label I.e. drop the extra padding from menu_item_padding_x that got there when separators with labels were implemented. --- diff --git a/src/menu/menu.c b/src/menu/menu.c index da7289e8..7d08aa41 100644 --- a/src/menu/menu.c +++ b/src/menu/menu.c @@ -138,8 +138,7 @@ menu_update_width(struct menu *menu) */ if (item->type == LAB_MENU_SEPARATOR_LINE) { int width = menu->size.width - - 2 * theme->menu_separator_padding_width - - 2 * theme->menu_item_padding_x; + - 2 * theme->menu_separator_padding_width; wlr_scene_rect_set_size( wlr_scene_rect_from_node(item->normal.text), width, theme->menu_separator_line_thickness); @@ -360,8 +359,7 @@ separator_create(struct menu *menu, const char *label) wlr_scene_node_set_position(&menuitem->tree->node, 0, menu->size.height); /* Vertically center-align separator line */ wlr_scene_node_set_position(menuitem->normal.text, - theme->menu_separator_padding_width - + theme->menu_item_padding_x, + theme->menu_separator_padding_width, theme->menu_separator_padding_height); } wlr_scene_node_set_position(&menuitem->tree->node, 0, menu->size.height);