Vertical padding size, used for spacing out elements 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.
The handle is the window edge decoration at the bottom of the window.
-# DERIVED DIMENSIONS
-
-The window title bar height is equal to the vertical font extents of the title.
-Padding will be added to this later.
-
# SEE ALSO
labwc(1), labwc-config(5), labwc-actions(5)
border.width: 1
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: #dddad6
window.inactive.border.color: #f6f5f4
struct theme {
int border_width;
int padding_height;
+ int title_height;
int menu_overlap_x;
int menu_overlap_y;
struct lab_data_buffer *corner_top_right_inactive_normal;
/* not set in rc.xml/themerc, but derived from font & padding_height */
- int title_height;
int osd_window_switcher_item_height;
};
{
theme->border_width = 1;
theme->padding_height = 3;
+ theme->title_height = INT_MIN;
theme->menu_overlap_x = 0;
theme->menu_overlap_y = 0;
if (match_glob(key, "padding.height")) {
theme->padding_height = atoi(value);
}
+ if (match_glob(key, "titlebar.height")) {
+ theme->title_height = atoi(value);
+ }
if (match_glob(key, "menu.items.padding.x")) {
theme->menu_item_padding_x = atoi(value);
}
static void
post_processing(struct theme *theme)
{
- theme->title_height = font_height(&rc.font_activewindow)
- + 2 * theme->padding_height;
+ int h = font_height(&rc.font_activewindow);
+ if (theme->title_height < h) {
+ theme->title_height = h + 2 * theme->padding_height;
+ }
+
theme->osd_window_switcher_item_height = font_height(&rc.font_osd)
+ 2 * theme->osd_window_switcher_item_padding_y
+ 2 * theme->osd_window_switcher_item_active_border_width;