mirror of
https://github.com/labwc/labwc.git
synced 2025-11-05 13:29:58 -05:00
theme: allow to set window button size (#1965)
This commit introduces new option "window.button.width". Despite the name it currently affects both width and height.
This commit is contained in:
parent
46ec513630
commit
e4afa10fe4
14 changed files with 59 additions and 33 deletions
|
|
@ -233,10 +233,11 @@ ssd_update_geometry(struct ssd *ssd)
|
|||
struct wlr_box cached = ssd->state.geometry;
|
||||
struct wlr_box current = ssd->view->current;
|
||||
|
||||
int min_view_width = rc.theme->window_button_width * SSD_BUTTON_COUNT;
|
||||
int eff_width = current.width;
|
||||
int eff_height = view_effective_height(ssd->view, /* use_pending */ false);
|
||||
|
||||
if (eff_width > 0 && eff_width < LAB_MIN_VIEW_WIDTH) {
|
||||
if (eff_width > 0 && eff_width < min_view_width) {
|
||||
/*
|
||||
* Prevent negative values in calculations like
|
||||
* `width - SSD_BUTTON_WIDTH * SSD_BUTTON_COUNT`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue