mirror of
https://github.com/labwc/labwc.git
synced 2025-11-03 09:01:51 -05:00
Add theme option to configure boxes from workspace OSD
This allows to configure width and height of "boxes" displayed in the workspace OSD. A setting of `0` disables the boxes.
This commit is contained in:
parent
45e0dad3f1
commit
268191fce8
5 changed files with 51 additions and 14 deletions
15
src/theme.c
15
src/theme.c
|
|
@ -326,6 +326,9 @@ theme_builtin(struct theme *theme)
|
|||
theme->osd_window_switcher_item_padding_y = 1;
|
||||
theme->osd_window_switcher_item_active_border_width = 2;
|
||||
|
||||
theme->osd_workspace_switcher_boxes_width = 20;
|
||||
theme->osd_workspace_switcher_boxes_height = 20;
|
||||
|
||||
/* inherit settings in post_processing() if not set elsewhere */
|
||||
theme->osd_bg_color[0] = FLT_MIN;
|
||||
theme->osd_border_width = INT_MIN;
|
||||
|
|
@ -512,6 +515,12 @@ entry(struct theme *theme, const char *key, const char *value)
|
|||
if (match_glob(key, "osd.window-switcher.item.active.border.width")) {
|
||||
theme->osd_window_switcher_item_active_border_width = atoi(value);
|
||||
}
|
||||
if (match_glob(key, "osd.workspace-switcher.boxes.width")) {
|
||||
theme->osd_workspace_switcher_boxes_width = atoi(value);
|
||||
}
|
||||
if (match_glob(key, "osd.workspace-switcher.boxes.height")) {
|
||||
theme->osd_workspace_switcher_boxes_height = atoi(value);
|
||||
}
|
||||
if (match_glob(key, "osd.label.text.color")) {
|
||||
parse_hexstr(value, theme->osd_label_text_color);
|
||||
}
|
||||
|
|
@ -860,6 +869,12 @@ post_processing(struct theme *theme)
|
|||
memcpy(theme->osd_border_color, theme->osd_label_text_color,
|
||||
sizeof(theme->osd_border_color));
|
||||
}
|
||||
if (theme->osd_workspace_switcher_boxes_width == 0) {
|
||||
theme->osd_workspace_switcher_boxes_height = 0;
|
||||
}
|
||||
if (theme->osd_workspace_switcher_boxes_height == 0) {
|
||||
theme->osd_workspace_switcher_boxes_width = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue