tree-wide: use rc.theme instead of server.theme

Having two global pointers to the same struct is redundant.
This commit is contained in:
John Lindgren 2026-03-21 22:47:22 -04:00 committed by Consolatis
parent 9550bccef2
commit d4ad27e636
18 changed files with 46 additions and 52 deletions

View file

@ -26,7 +26,7 @@ static void
update_preview_outlines(struct view *view)
{
/* Create / Update preview outline tree */
struct theme *theme = server.theme;
struct theme *theme = rc.theme;
struct lab_scene_rect *rect = server.cycle.preview_outline;
if (!rect) {
struct lab_scene_rect_options opts = {

View file

@ -32,7 +32,7 @@ create_fields_scene(struct view *view,
struct wlr_scene_tree *parent, const float *text_color,
const float *bg_color, int field_widths_sum, int x, int y)
{
struct theme *theme = server.theme;
struct theme *theme = rc.theme;
struct window_switcher_classic_theme *switcher_theme =
&theme->osd_window_switcher_classic;
@ -80,7 +80,7 @@ static void
cycle_osd_classic_init(struct cycle_osd_output *osd_output)
{
struct output *output = osd_output->output;
struct theme *theme = server.theme;
struct theme *theme = rc.theme;
struct window_switcher_classic_theme *switcher_theme =
&theme->osd_window_switcher_classic;
int padding = theme->osd_border_width + switcher_theme->padding;

View file

@ -119,7 +119,7 @@ static struct cycle_osd_thumbnail_item *
create_item_scene(struct wlr_scene_tree *parent, struct view *view,
struct cycle_osd_output *osd_output)
{
struct theme *theme = server.theme;
struct theme *theme = rc.theme;
struct window_switcher_thumbnail_theme *switcher_theme =
&theme->osd_window_switcher_thumbnail;
int padding = theme->border_width + switcher_theme->item_padding;
@ -196,7 +196,7 @@ static void
get_items_geometry(struct output *output, int nr_thumbs,
int *nr_cols, int *nr_rows, int *nr_visible_rows)
{
struct theme *theme = server.theme;
struct theme *theme = rc.theme;
struct window_switcher_thumbnail_theme *switcher_theme =
&theme->osd_window_switcher_thumbnail;
int output_width, output_height;
@ -232,7 +232,7 @@ static void
cycle_osd_thumbnail_init(struct cycle_osd_output *osd_output)
{
struct output *output = osd_output->output;
struct theme *theme = server.theme;
struct theme *theme = rc.theme;
struct window_switcher_thumbnail_theme *switcher_theme =
&theme->osd_window_switcher_thumbnail;
int padding = theme->osd_border_width + switcher_theme->padding;