mirror of
https://github.com/labwc/labwc.git
synced 2025-11-03 09:01:51 -05:00
Support inactive unpressed icons
This commit is contained in:
parent
e62c251a74
commit
83331e57ed
6 changed files with 48 additions and 17 deletions
11
src/deco.c
11
src/deco.c
|
|
@ -42,23 +42,24 @@ struct wlr_box deco_box(struct view *view, enum deco_part deco_part)
|
|||
}
|
||||
switch (deco_part) {
|
||||
case LAB_DECO_BUTTON_CLOSE:
|
||||
wlr_texture_get_size(theme.xbm_close, &box.width, &box.height);
|
||||
wlr_texture_get_size(theme.xbm_close_active_unpressed,
|
||||
&box.width, &box.height);
|
||||
margin = (rc.title_height - box.height) / 2;
|
||||
box.x = view->x + view->surface->current.width + margin -
|
||||
rc.title_height;
|
||||
box.y = view->y - rc.title_height + margin;
|
||||
break;
|
||||
case LAB_DECO_BUTTON_MAXIMIZE:
|
||||
wlr_texture_get_size(theme.xbm_maximize, &box.width,
|
||||
&box.height);
|
||||
wlr_texture_get_size(theme.xbm_maximize_active_unpressed,
|
||||
&box.width, &box.height);
|
||||
margin = (rc.title_height - box.height) / 2;
|
||||
box.x = view->x + view->surface->current.width + margin -
|
||||
rc.title_height * 2;
|
||||
box.y = view->y - rc.title_height + margin;
|
||||
break;
|
||||
case LAB_DECO_BUTTON_ICONIFY:
|
||||
wlr_texture_get_size(theme.xbm_iconify, &box.width,
|
||||
&box.height);
|
||||
wlr_texture_get_size(theme.xbm_iconify_active_unpressed,
|
||||
&box.width, &box.height);
|
||||
margin = (rc.title_height - box.height) / 2;
|
||||
box.x = view->x + view->surface->current.width + margin -
|
||||
rc.title_height * 3;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue