]> git.mdlowis.com Git - proto/labwc.git/commit
menu: Dynamically adjust menu width based on widest item
authorConsolatis <35009135+Consolatis@users.noreply.github.com>
Mon, 5 Dec 2022 13:38:16 +0000 (14:38 +0100)
committerJohan Malm <johanmalm@users.noreply.github.com>
Tue, 6 Dec 2022 21:08:43 +0000 (21:08 +0000)
commitd00327bc32fcb450a3f96bb24b2655bf3c691f8d
treecfde1e87a6cfa340e0c40322ad2a46867d5d5fd0
parentf0666ba5c9d139c09a95076d3b7fe478d85a93e6
menu: Dynamically adjust menu width based on widest item

Adds two new theme vars:
- menu.width.min (menu will never be smaller than this)
- menu.width.max (menu will never be wider than this + padding)

A fixed menu width can be achieved by setting
menu.width.min == menu.width.max.
docs/labwc-theme.5.scd
include/common/scaled_font_buffer.h
include/menu/menu.h
include/theme.h
src/common/scaled_font_buffer.c
src/menu/menu.c
src/theme.c