menu: add title theme options (#2097)

Add theme options `menu.title.text.color` and `menu.title.text.justify`.

Add font place MenuHeader: `<font place="MenuHeader">`

Add `Oblique` font style

```
<theme>
  <font>
    <slant>Oblique</slant>
  </font>
</theme>
```
This commit is contained in:
droc12345 2024-08-21 12:27:07 -05:00 committed by GitHub
parent 6564e1bc8d
commit 8fda9968e6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 79 additions and 7 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 title
- 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 Center.
*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,9 @@ 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.text.color*
Text color of separator label. Default #ffffff.
*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 menu title.
To create an empty header with no text,
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

@ -63,6 +63,8 @@ menu.separator.padding.width: 6
menu.separator.padding.height: 3
menu.separator.color: #888888
menu.title.bg.color: #589bda
menu.title.text.color: #ffffff
menu.title.text.justify: Center
# on screen display (window-cycle dialog)
osd.bg.color: #e1dedb