mirror of
https://github.com/labwc/labwc.git
synced 2025-11-03 09:01:51 -05:00
menu: Convert hardcoded item padding to theme vars
Adds two new theme vars: - menu.items.padding.x - menu.items.padding.y
This commit is contained in:
parent
3da7cfd8c6
commit
f0666ba5c9
4 changed files with 23 additions and 5 deletions
|
|
@ -128,6 +128,9 @@ 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_item_padding_x = 7;
|
||||
theme->menu_item_padding_y = 4;
|
||||
|
||||
theme->menu_separator_line_thickness = 1;
|
||||
theme->menu_separator_padding_width = 6;
|
||||
theme->menu_separator_padding_height = 3;
|
||||
|
|
@ -167,6 +170,12 @@ entry(struct theme *theme, const char *key, const char *value)
|
|||
if (match(key, "padding.height")) {
|
||||
theme->padding_height = atoi(value);
|
||||
}
|
||||
if (match(key, "menu.items.padding.x")) {
|
||||
theme->menu_item_padding_x = atoi(value);
|
||||
}
|
||||
if (match(key, "menu.items.padding.y")) {
|
||||
theme->menu_item_padding_y = atoi(value);
|
||||
}
|
||||
if (match(key, "menu.overlap.x")) {
|
||||
theme->menu_overlap_x = atoi(value);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue