This commit is contained in:
Jack Zeal 2026-04-06 01:10:21 +00:00 committed by GitHub
commit 7cd2f4184d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 1215 additions and 54 deletions

View file

@ -37,6 +37,8 @@ update_preview_outlines(struct view *view)
},
.nr_borders = 3,
.border_width = theme->osd_window_switcher_preview_border_width,
.border_type = theme->osd_border_type,
.bevel_width = theme->osd_border_bevel_width
};
rect = lab_scene_rect_create(&server.scene->tree, &opts);
wlr_scene_node_place_above(&rect->tree->node,

View file

@ -120,6 +120,8 @@ cycle_osd_classic_init(struct cycle_osd_output *osd_output)
.bg_color = bg_color,
.width = w,
.height = h,
.border_type = theme->osd_border_type,
.bevel_width = theme->osd_border_bevel_width
};
lab_scene_rect_create(osd_output->tree, &bg_opts);
@ -202,6 +204,8 @@ cycle_osd_classic_init(struct cycle_osd_output *osd_output)
.bg_color = active_bg_color,
.width = w - 2 * padding,
.height = switcher_theme->item_height,
.border_type = theme->osd_border_type,
.bevel_width = theme->osd_border_bevel_width
};
struct lab_scene_rect *highlight_rect = lab_scene_rect_create(
item->active_tree, &highlight_opts);

View file

@ -3,7 +3,9 @@
#include <wlr/types/wlr_scene.h>
#include "common/lab-scene-rect.h"
#include "common/scene-helpers.h"
#include "config/rcxml.h"
#include "labwc.h"
#include "theme.h"
#include "cycle.h"
#include "output.h"
@ -12,6 +14,8 @@ cycle_osd_scroll_init(struct cycle_osd_output *osd_output, struct wlr_box bar_ar
int delta_y, int nr_cols, int nr_rows, int nr_visible_rows,
float *border_color, float *bg_color)
{
struct theme *theme = rc.theme;
if (nr_visible_rows >= nr_rows) {
/* OSD doesn't have so many windows to scroll through */
return;
@ -35,6 +39,8 @@ 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,
.border_type = theme->osd_border_type,
.bevel_width = theme->osd_border_bevel_width
};
scroll->bar = lab_scene_rect_create(scroll->bar_tree, &scrollbar_opts);
}

View file

@ -154,6 +154,8 @@ 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,
.border_type = theme->osd_border_type,
.bevel_width = theme->osd_border_bevel_width
};
item->active_bg = lab_scene_rect_create(tree, &opts);
@ -286,6 +288,8 @@ 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,
.border_type = theme->osd_border_type,
.bevel_width = theme->osd_border_bevel_width
};
struct lab_scene_rect *bg =
lab_scene_rect_create(osd_output->tree, &bg_opts);