From: Johan Malm Date: Sun, 29 Sep 2024 17:22:47 +0000 (+0100) Subject: theme: remove titlebar.height option X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=2884f77b309561268cc647f0e45beea0f9e058de;p=proto%2Flabwc.git theme: remove titlebar.height option This theme setting does not exist in Openbox spec and has just been an additional 'knob' to tweak the height which is otherwise derived from the sizes of the objects within it plus padding. --- diff --git a/docs/labwc-theme.5.scd b/docs/labwc-theme.5.scd index e1b7bcb7..a7d4459e 100644 --- a/docs/labwc-theme.5.scd +++ b/docs/labwc-theme.5.scd @@ -60,11 +60,6 @@ labwc-config(5). in the window decorations. Default is 3. -*titlebar.height* - Window title bar height. - Default equals the vertical font extents of the title plus 2x - padding.height. - *menu.items.padding.x* Horizontal padding of menu text entries in pixels. Default is 7. diff --git a/docs/themerc b/docs/themerc index 49064207..d6706c78 100644 --- a/docs/themerc +++ b/docs/themerc @@ -10,10 +10,6 @@ border.width: 1 padding.width: 0 padding.height: 3 -# The following options has no default, but fallbacks back to -# font-height + 2x padding.height if not set. -# titlebar.height: - # window border window.active.border.color: #e1dedb window.inactive.border.color: #f6f5f4 diff --git a/src/theme.c b/src/theme.c index 2926b80b..eb8803bd 100644 --- a/src/theme.c +++ b/src/theme.c @@ -715,10 +715,6 @@ entry(struct theme *theme, const char *key, const char *value) theme->padding_height = get_int_if_positive( value, "padding.height"); } - if (match_glob(key, "titlebar.height")) { - theme->title_height = get_int_if_positive( - value, "titlebar.height"); - } if (match_glob(key, "menu.items.padding.x")) { theme->menu_item_padding_x = get_int_if_positive( value, "menu.items.padding.x"); @@ -1474,9 +1470,7 @@ static void post_processing(struct theme *theme) { int h = MAX(font_height(&rc.font_activewindow), font_height(&rc.font_inactivewindow)); - if (theme->title_height < h) { - theme->title_height = h + 2 * theme->padding_height; - } + theme->title_height = h + 2 * theme->padding_height; theme->menu_item_height = font_height(&rc.font_menuitem) + 2 * theme->menu_item_padding_y;