mirror of
https://github.com/labwc/labwc.git
synced 2026-02-09 10:07:31 -05:00
menu: support <separator />
Add theme options: - menu.separator.width - menu.separator.padding.width - menu.separator.padding.height - menu.separator.color Support separator lines defined by <separator /> Note that separator labels (with text) defined by <separator label="" /> are not supported.
This commit is contained in:
parent
f13fbd7aa6
commit
437230b3a0
6 changed files with 123 additions and 19 deletions
18
src/theme.c
18
src/theme.c
|
|
@ -128,6 +128,11 @@ theme_builtin(struct theme *theme)
|
|||
parse_hexstr("#dddad6", theme->menu_items_active_bg_color);
|
||||
parse_hexstr("#000000", theme->menu_items_active_text_color);
|
||||
|
||||
theme->menu_separator_width = 1;
|
||||
theme->menu_separator_padding_width = 6;
|
||||
theme->menu_separator_padding_height = 3;
|
||||
parse_hexstr("#888888", theme->menu_separator_color);
|
||||
|
||||
/* inherit settings in post_processing() if not set elsewhere */
|
||||
theme->osd_bg_color[0] = FLT_MIN;
|
||||
theme->osd_border_width = INT_MIN;
|
||||
|
|
@ -259,6 +264,19 @@ entry(struct theme *theme, const char *key, const char *value)
|
|||
parse_hexstr(value, theme->menu_items_active_text_color);
|
||||
}
|
||||
|
||||
if (match(key, "menu.separator.width")) {
|
||||
theme->menu_separator_width = atoi(value);
|
||||
}
|
||||
if (match(key, "menu.separator.padding.width")) {
|
||||
theme->menu_separator_padding_width = atoi(value);
|
||||
}
|
||||
if (match(key, "menu.separator.padding.height")) {
|
||||
theme->menu_separator_padding_height = atoi(value);
|
||||
}
|
||||
if (match(key, "menu.separator.color")) {
|
||||
parse_hexstr(value, theme->menu_separator_color);
|
||||
}
|
||||
|
||||
if (match(key, "osd.bg.color")) {
|
||||
parse_hexstr(value, theme->osd_bg_color);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue