mirror of
https://github.com/labwc/labwc.git
synced 2025-11-03 09:01:51 -05:00
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:
parent
6564e1bc8d
commit
8fda9968e6
12 changed files with 79 additions and 7 deletions
10
src/theme.c
10
src/theme.c
|
|
@ -487,6 +487,7 @@ theme_builtin(struct theme *theme, struct server *server)
|
|||
parse_hexstr("#000000", theme->window_active_label_text_color);
|
||||
parse_hexstr("#000000", theme->window_inactive_label_text_color);
|
||||
theme->window_label_text_justify = parse_justification("Center");
|
||||
theme->menu_title_text_justify = parse_justification("Center");
|
||||
|
||||
theme->window_button_width = 26;
|
||||
|
||||
|
|
@ -530,6 +531,8 @@ theme_builtin(struct theme *theme, struct server *server)
|
|||
|
||||
parse_hexstr("#589bda", theme->menu_title_bg_color);
|
||||
|
||||
parse_hexstr("#ffffff", theme->menu_title_text_color);
|
||||
|
||||
theme->osd_window_switcher_width = 600;
|
||||
theme->osd_window_switcher_width_is_percent = false;
|
||||
theme->osd_window_switcher_padding = 4;
|
||||
|
|
@ -606,6 +609,9 @@ entry(struct theme *theme, const char *key, const char *value)
|
|||
if (match_glob(key, "menu.items.padding.y")) {
|
||||
theme->menu_item_padding_y = atoi(value);
|
||||
}
|
||||
if (match_glob(key, "menu.title.text.justify")) {
|
||||
theme->menu_title_text_justify = parse_justification(value);
|
||||
}
|
||||
if (match_glob(key, "menu.overlap.x")) {
|
||||
theme->menu_overlap_x = atoi(value);
|
||||
}
|
||||
|
|
@ -772,6 +778,10 @@ entry(struct theme *theme, const char *key, const char *value)
|
|||
parse_hexstr(value, theme->menu_title_bg_color);
|
||||
}
|
||||
|
||||
if (match_glob(key, "menu.title.text.color")) {
|
||||
parse_hexstr(value, theme->menu_title_text_color);
|
||||
}
|
||||
|
||||
if (match_glob(key, "osd.bg.color")) {
|
||||
parse_hexstr(value, theme->osd_bg_color);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue