menu separator

changes to make separators work with/without label, added text color, font selection and center justification for label headers
This commit is contained in:
Droc 2024-08-17 08:47:14 -05:00
parent 8ce564551d
commit 6ff0d0a675
14 changed files with 95 additions and 9 deletions

View file

@ -448,6 +448,7 @@ extending outward from the snapped edge.
- ActiveWindow - titlebar of active window
- InactiveWindow - titlebar of all windows that aren't focused by the
cursor
- MenuHeader - menu header font ie separator labels
- MenuItem - menu item (currently only root menu)
- OnScreenDisplay - items in the on screen display
If no place attribute is provided, the setting will be applied to all
@ -460,7 +461,7 @@ extending outward from the snapped edge.
Font size in pixels. Default is 10.
*<theme><font place=""><slant>*
Font slant (normal or italic). Default is normal.
Font slant (normal, oblique or italic). Default is normal.
*<theme><font place=""><weight>*
Font weight (normal or bold). Default is normal.

View file

@ -67,6 +67,10 @@ labwc-config(5).
Vertical padding of menu text entries in pixels.
Default is 4.
*menu.title.text.justify*
Specifies how menu titles are aligned in the titlebar.
Type justification. Default Left.
*menu.overlap.x*
Horizontal overlap in pixels between submenus and their parents. A
positive value move submenus over the top of their parents, whereas a
@ -178,6 +182,12 @@ elements are not listed here, but are supported.
Menu title color. Default #589bda.
Note: A menu title is a separator with a label.
*menu.title.bg.color*
Background color of separator label.
*menu.title.text.color*
Text color of separator label.
*osd.bg.color*
Background color of on-screen-display. Inherits
*window.active.title.bg.color* if not set.

View file

@ -61,6 +61,12 @@
</menu>
<menu id="some-custom-menu">
<!--
Creates a separator w/title that is used as a header
To create an empty header with no title,
set label=" ", not label=""
-->
<separator label="custom menu" />
<item label="Reconfigure">
<action name="Reconfigure" />
</item>

View file

@ -43,6 +43,12 @@
<slant>normal</slant>
<weight>normal</weight>
</font>
<font place="MenuHeader">
<name>sans</name>
<size>10</size>
<slant>normal</slant>
<weight>normal</weight>
</font>
<font place="MenuItem">
<name>sans</name>
<size>10</size>

View file

@ -58,11 +58,13 @@ menu.items.active.bg.color: #e1dedb
menu.items.active.text.color: #000000
menu.items.padding.x: 7
menu.items.padding.y: 4
menu.title.text.justify: left
menu.separator.width: 1
menu.separator.padding.width: 6
menu.separator.padding.height: 3
menu.separator.color: #888888
menu.title.bg.color: #589bda
menu.title.text.color: #ffff00
# on screen display (window-cycle dialog)
osd.bg.color: #e1dedb