]> git.mdlowis.com Git - proto/labwc.git/commit
ssd: allow ssd to be smaller than minimal size by hiding buttons
authortokyo4j <hrak1529@gmail.com>
Sun, 25 Aug 2024 07:33:41 +0000 (16:33 +0900)
committerAndrew J. Hesford <ajh@sideband.org>
Tue, 3 Sep 2024 12:12:25 +0000 (08:12 -0400)
commit1be69dc28b000854b4781c62203ef8ef67e25be8
treeebe9c6098c1be373d05bb20084485fe27ca42f32
parentb34f2c9d85a52bc19a9458b6d38bae64fae55baa
ssd: allow ssd to be smaller than minimal size by hiding buttons

This fixes the ugly look of SSD for tiny windows (e.g. "xterm -geometry
1x1") due to the early return in `ssd_update_geometry()`. Now SSDs are
rendered correctly for those windows by hiding some buttons when the
window width is smaller than the total width of buttons. Additionally for
windows smaller than (button width)*2, the corners are un-rounded so a
small titlebar can be rendered with a scene-rect.
include/ssd-internal.h
src/ssd/ssd-border.c
src/ssd/ssd-extents.c
src/ssd/ssd-part.c
src/ssd/ssd-titlebar.c
src/ssd/ssd.c