theme: add window.titlebar.padding.{width,height}

...to replace padding.{width,height} to minimize breaking changes with the
visual appearance of the titlebar.

With the diverging labwc specification for the titlebar (listed below)
we have to choose between (a) not supporting the padding.{width,height}
option which exist in many extant Openbox themes to keep titlebar height
(almost) the same; or (b) making the allocated button areas much smaller
and not keeping the default hover going all the way to the edges. All in
all it just seems a lot simpler and cleaner to break this link to the
openbox spec.

Examples of previous change driving the requirement for this change:

- SVG and PNG support which often results in large icons with hover
  effects.
- Theme option window.button.{height,width}
- Larger default areas for icons (26x26)

In way of an example, Numix theme sets a padding.height of 6 which would
have resulted in a titlebar 12px taller without this change.
This commit is contained in:
Johan Malm 2024-10-08 17:52:57 +01:00
parent 383fb20bf4
commit e16e78e7a4
6 changed files with 36 additions and 29 deletions

View file

@ -2284,7 +2284,7 @@ view_get_min_width(void)
return (rc.theme->window_button_width * (button_count_left + button_count_right)) +
(rc.theme->window_button_spacing * MAX((button_count_right - 1), 0)) +
(rc.theme->window_button_spacing * MAX((button_count_left - 1), 0)) +
(2 * rc.theme->padding_width);
(2 * rc.theme->window_titlebar_padding_width);
}
void