theme: reorder theme entries in documentation and codebase

This commit is contained in:
tokyo4j 2024-11-12 09:17:04 +09:00 committed by Johan Malm
parent eaf11face6
commit 720ae1fc87
3 changed files with 104 additions and 110 deletions

View file

@ -563,8 +563,6 @@ theme_builtin(struct theme *theme, struct server *server)
theme->window_titlebar_padding_height = 0;
theme->window_titlebar_padding_width = 0;
theme->title_height = INT_MIN;
theme->menu_overlap_x = 0;
theme->menu_overlap_y = 0;
parse_hexstr("#e1dedb", theme->window_active_border_color);
parse_hexstr("#f6f5f4", theme->window_inactive_border_color);
@ -577,7 +575,6 @@ 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;
theme->window_button_height = 26;
@ -597,24 +594,25 @@ theme_builtin(struct theme *theme, struct server *server)
parse_hexstr("#00000060", theme->window_active_shadow_color);
parse_hexstr("#00000040", theme->window_inactive_shadow_color);
theme->menu_overlap_x = 0;
theme->menu_overlap_y = 0;
theme->menu_min_width = 20;
theme->menu_max_width = 200;
theme->menu_item_padding_x = 7;
theme->menu_item_padding_y = 4;
parse_hexstr("#fcfbfa", theme->menu_items_bg_color);
parse_hexstr("#000000", theme->menu_items_text_color);
parse_hexstr("#e1dedb", 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_min_width = 20;
theme->menu_max_width = 200;
theme->menu_separator_line_thickness = 1;
theme->menu_separator_padding_width = 6;
theme->menu_separator_padding_height = 3;
parse_hexstr("#888888", theme->menu_separator_color);
parse_hexstr("#589bda", theme->menu_title_bg_color);
theme->menu_title_text_justify = parse_justification("Center");
parse_hexstr("#ffffff", theme->menu_title_text_color);
theme->osd_window_switcher_width = 600;
@ -708,25 +706,6 @@ entry(struct theme *theme, const char *key, const char *value)
if (match_glob(key, "padding.height")) {
wlr_log(WLR_ERROR, "padding.height is no longer supported");
}
if (match_glob(key, "menu.items.padding.x")) {
theme->menu_item_padding_x = get_int_if_positive(
value, "menu.items.padding.x");
}
if (match_glob(key, "menu.items.padding.y")) {
theme->menu_item_padding_y = get_int_if_positive(
value, "menu.items.padding.y");
}
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 = get_int_if_positive(
value, "menu.overlap.x");
}
if (match_glob(key, "menu.overlap.y")) {
theme->menu_overlap_y = get_int_if_positive(
value, "menu.overlap.y");
}
if (match_glob(key, "window.active.border.color")) {
parse_hexstr(value, theme->window_active_border_color);
@ -872,6 +851,14 @@ entry(struct theme *theme, const char *key, const char *value)
parse_hexstr(value, theme->window_inactive_shadow_color);
}
if (match_glob(key, "menu.overlap.x")) {
theme->menu_overlap_x = get_int_if_positive(
value, "menu.overlap.x");
}
if (match_glob(key, "menu.overlap.y")) {
theme->menu_overlap_y = get_int_if_positive(
value, "menu.overlap.y");
}
if (match_glob(key, "menu.width.min")) {
theme->menu_min_width = get_int_if_positive(
value, "menu.width.min");
@ -881,6 +868,14 @@ entry(struct theme *theme, const char *key, const char *value)
value, "menu.width.max");
}
if (match_glob(key, "menu.items.padding.x")) {
theme->menu_item_padding_x = get_int_if_positive(
value, "menu.items.padding.x");
}
if (match_glob(key, "menu.items.padding.y")) {
theme->menu_item_padding_y = get_int_if_positive(
value, "menu.items.padding.y");
}
if (match_glob(key, "menu.items.bg.color")) {
parse_hexstr(value, theme->menu_items_bg_color);
}
@ -913,7 +908,9 @@ entry(struct theme *theme, const char *key, const char *value)
if (match_glob(key, "menu.title.bg.color")) {
parse_hexstr(value, theme->menu_title_bg_color);
}
if (match_glob(key, "menu.title.text.justify")) {
theme->menu_title_text_justify = parse_justification(value);
}
if (match_glob(key, "menu.title.text.color")) {
parse_hexstr(value, theme->menu_title_text_color);
}