Handle the highlights on the window switcher with a different bevel that doesn't involve leaving crumbs

This commit is contained in:
Jack Zeal 2026-03-26 19:35:38 -07:00
parent 8c46add98a
commit 25b5ad08e4
7 changed files with 42 additions and 27 deletions

View file

@ -37,6 +37,7 @@ update_preview_outlines(struct view *view)
},
.nr_borders = 3,
.border_width = theme->osd_window_switcher_preview_border_width,
.beveled = 1, // Checked
};
rect = lab_scene_rect_create(&server.scene->tree, &opts);
wlr_scene_node_place_above(&rect->tree->node,

View file

@ -120,6 +120,7 @@ cycle_osd_classic_init(struct cycle_osd_output *osd_output)
.bg_color = bg_color,
.width = w,
.height = h,
.beveled = 1,
};
lab_scene_rect_create(osd_output->tree, &bg_opts);
@ -202,6 +203,7 @@ cycle_osd_classic_init(struct cycle_osd_output *osd_output)
.bg_color = active_bg_color,
.width = w - 2 * padding,
.height = switcher_theme->item_height,
.beveled = 2,
};
struct lab_scene_rect *highlight_rect = lab_scene_rect_create(
item->active_tree, &highlight_opts);

View file

@ -35,6 +35,7 @@ cycle_osd_scroll_init(struct cycle_osd_output *osd_output, struct wlr_box bar_ar
.bg_color = bg_color,
.width = bar_area.width,
.height = bar_area.height * nr_visible_rows / nr_rows,
.beveled = 1,
};
scroll->bar = lab_scene_rect_create(scroll->bar_tree, &scrollbar_opts);
}

View file

@ -150,6 +150,7 @@ create_item_scene(struct wlr_scene_tree *parent, struct view *view,
.bg_color = switcher_theme->item_active_bg_color,
.width = switcher_theme->item_width,
.height = switcher_theme->item_height,
.beveled = 2,
};
item->active_bg = lab_scene_rect_create(tree, &opts);
@ -282,6 +283,7 @@ cycle_osd_thumbnail_init(struct cycle_osd_output *osd_output)
.bg_color = theme->osd_bg_color,
.width = items_width + 2 * padding,
.height = items_height + 2 * padding,
.beveled = 1,
};
struct lab_scene_rect *bg =
lab_scene_rect_create(osd_output->tree, &bg_opts);