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.
This commit is contained in:
Consolatis 2022-12-05 14:38:16 +01:00 committed by Johan Malm
parent f0666ba5c9
commit d00327bc32
7 changed files with 115 additions and 14 deletions

View file

@ -59,6 +59,14 @@ A theme consists of a themerc file and optionally some xbm icons.
Vertical offset in pixels between submenus and their parents. Positive
values for downwards and negative for upwards. Default is 0.
*menu.width.min*
Minimal width for menus. Default is 20.
A fixed width can be achieved by setting .min and .max to the same value.
*menu.width.max*
Maximal width for menus. Default is 200.
A fixed width can be achieved by setting .min and .max to the same value.
*window.active.border.color*
Border color of active window