mirror of
https://github.com/labwc/labwc.git
synced 2025-11-05 13:29:58 -05:00
ssd: use dynamic titlebar height based on font size and padding
This commit is contained in:
parent
3bb44fc9f2
commit
e4f1f9a975
9 changed files with 23 additions and 18 deletions
|
|
@ -13,7 +13,7 @@ ssd_extents_create(struct view *view)
|
|||
struct wl_list *part_list = &view->ssd.extents.parts;
|
||||
int width = view->w;
|
||||
int height = view->h;
|
||||
int full_height = height + theme->border_width + SSD_HEIGHT;
|
||||
int full_height = height + theme->border_width + theme->title_height;
|
||||
int full_width = width + 2 * theme->border_width;
|
||||
int extended_area = EXTENDED_AREA;
|
||||
int corner_size = extended_area + theme->border_width + BUTTON_WIDTH / 2;
|
||||
|
|
@ -26,8 +26,8 @@ ssd_extents_create(struct view *view)
|
|||
wlr_scene_node_set_enabled(parent, false);
|
||||
}
|
||||
wl_list_init(&view->ssd.extents.parts);
|
||||
wlr_scene_node_set_position(parent,
|
||||
-(theme->border_width + extended_area), -(SSD_HEIGHT + extended_area));
|
||||
wlr_scene_node_set_position(parent, -(theme->border_width + extended_area),
|
||||
-(theme->title_height + extended_area));
|
||||
|
||||
/* Top */
|
||||
add_scene_rect(part_list, LAB_SSD_PART_CORNER_TOP_LEFT, parent,
|
||||
|
|
@ -75,7 +75,7 @@ ssd_extents_update(struct view *view)
|
|||
|
||||
int width = view->w;
|
||||
int height = view->h;
|
||||
int full_height = height + theme->border_width + SSD_HEIGHT;
|
||||
int full_height = height + theme->border_width + theme->title_height;
|
||||
int full_width = width + 2 * theme->border_width;
|
||||
int extended_area = EXTENDED_AREA;
|
||||
int corner_size = extended_area + theme->border_width + BUTTON_WIDTH / 2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue