mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
src/menu.c: Clamp separator width
Reported-by: @Flrian
This commit is contained in:
parent
87fe6878a3
commit
dcedfee5d1
1 changed files with 2 additions and 1 deletions
|
|
@ -178,9 +178,10 @@ separator_create(struct menu *menu, const char *label)
|
|||
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,
|
||||
MENUWIDTH - 2 * theme->menu_separator_padding_width,
|
||||
width > 0 ? width : 0,
|
||||
theme->menu_separator_width,
|
||||
theme->menu_separator_color)->node;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue