]> git.mdlowis.com Git - proto/labwc.git/commitdiff
menu: don't include menu.border.width for menu title height
authortokyo4j <hrak1529@gmail.com>
Tue, 26 Nov 2024 00:44:27 +0000 (09:44 +0900)
committerHiroaki Yamamoto <hrak1529@gmail.com>
Tue, 26 Nov 2024 01:05:40 +0000 (10:05 +0900)
It was a cruft from my experiment of adding borders around titles.

It even caused an integer overflow because theme->menu_border_width can be
INT_MIN when menu_header_height is calculated.

src/theme.c

index 0637a8dfd9634302d40d5c474a184e76f1e80865..439a3184f64d1d1bb9b7318ce155b6b9f71501aa 100644 (file)
@@ -1457,8 +1457,7 @@ post_processing(struct theme *theme)
                + 2 * theme->menu_items_padding_y;
 
        theme->menu_header_height = font_height(&rc.font_menuheader)
-               + 2 * theme->menu_items_padding_y
-               + 2 * theme->menu_border_width;
+               + 2 * theme->menu_items_padding_y;
 
        theme->osd_window_switcher_item_height = font_height(&rc.font_osd)
                + 2 * theme->osd_window_switcher_item_padding_y