mirror of
https://github.com/labwc/labwc.git
synced 2026-02-14 04:28:07 -05:00
osd-classic: add theme options for selected window item
This commit adds new theme options: - osd.window-switcher.style-classic.item.active.border.color - osd.window-switcher.style-classic.item.active.bg.color These theme options configures the border/background of selected window item in the `classic` style window switcher. Their default values are identical to `thumbnail` style window switcher, which means the default border color is now `osd.label.text.color` with 50% opacity and the default background color is now `osd.label.text.color` with 15% opacity.
This commit is contained in:
parent
5f981226c2
commit
5e8df27f84
5 changed files with 96 additions and 46 deletions
16
src/theme.c
16
src/theme.c
|
|
@ -604,6 +604,8 @@ theme_builtin(struct theme *theme, struct server *server)
|
|||
theme->osd_window_switcher_classic.item_padding_x = 10;
|
||||
theme->osd_window_switcher_classic.item_padding_y = 1;
|
||||
theme->osd_window_switcher_classic.item_active_border_width = 2;
|
||||
theme->osd_window_switcher_classic.item_active_border_color[0] = FLT_MIN;
|
||||
theme->osd_window_switcher_classic.item_active_bg_color[0] = FLT_MIN;
|
||||
theme->osd_window_switcher_classic.item_icon_size = -1;
|
||||
|
||||
theme->osd_window_switcher_thumbnail.max_width = 80;
|
||||
|
|
@ -989,6 +991,12 @@ entry(struct theme *theme, const char *key, const char *value)
|
|||
get_int_if_positive(value,
|
||||
"osd.window-switcher.style-classic.item.active.border.width");
|
||||
}
|
||||
if (match_glob(key, "osd.window-switcher.style-classic.item.active.border.color")) {
|
||||
parse_color(value, switcher_classic_theme->item_active_border_color);
|
||||
}
|
||||
if (match_glob(key, "osd.window-switcher.style-classic.item.active.bg.color")) {
|
||||
parse_color(value, switcher_classic_theme->item_active_bg_color);
|
||||
}
|
||||
if (match_glob(key, "osd.window-switcher.style-classic.item.icon.size")
|
||||
|| match_glob(key, "osd.window-switcher.item.icon.size")) {
|
||||
switcher_classic_theme->item_icon_size =
|
||||
|
|
@ -1746,6 +1754,14 @@ post_processing(struct theme *theme)
|
|||
memcpy(theme->osd_border_color, theme->osd_label_text_color,
|
||||
sizeof(theme->osd_border_color));
|
||||
}
|
||||
if (switcher_classic_theme->item_active_border_color[0] == FLT_MIN) {
|
||||
blend_color_with_bg(switcher_classic_theme->item_active_border_color,
|
||||
theme->osd_label_text_color, 0.50, theme->osd_bg_color);
|
||||
}
|
||||
if (switcher_classic_theme->item_active_bg_color[0] == FLT_MIN) {
|
||||
blend_color_with_bg(switcher_classic_theme->item_active_bg_color,
|
||||
theme->osd_label_text_color, 0.15, theme->osd_bg_color);
|
||||
}
|
||||
if (switcher_thumb_theme->item_active_border_color[0] == FLT_MIN) {
|
||||
blend_color_with_bg(switcher_thumb_theme->item_active_border_color,
|
||||
theme->osd_label_text_color, 0.50, theme->osd_bg_color);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue