theme: move osd.window-switcher.* to osd.window-switcher.style-classic.*

Backward compatibility is preserved.
This commit is contained in:
tokyo4j 2025-08-08 12:42:41 +09:00 committed by Johan Malm
parent 92ee5083f0
commit 6e2805f692
7 changed files with 115 additions and 101 deletions

View file

@ -12,6 +12,8 @@
#include "theme.h"
#include "view.h"
#define PADDING rc.theme->osd_window_switcher_classic.padding
static void
resize_indicator_reconfigure_view(struct resize_indicator *indicator)
{
@ -19,7 +21,7 @@ resize_indicator_reconfigure_view(struct resize_indicator *indicator)
struct theme *theme = rc.theme;
indicator->height = font_height(&rc.font_osd)
+ 2 * theme->osd_window_switcher_padding
+ 2 * PADDING
+ 2 * theme->osd_border_width;
/* Static positions */
@ -27,8 +29,8 @@ resize_indicator_reconfigure_view(struct resize_indicator *indicator)
theme->osd_border_width, theme->osd_border_width);
wlr_scene_node_set_position(&indicator->text->scene_buffer->node,
theme->osd_border_width + theme->osd_window_switcher_padding,
theme->osd_border_width + theme->osd_window_switcher_padding);
theme->osd_border_width + PADDING,
theme->osd_border_width + PADDING);
/* Colors */
wlr_scene_rect_set_color(indicator->border, theme->osd_border_color);
@ -107,7 +109,7 @@ resize_indicator_set_size(struct resize_indicator *indicator, int width)
/* We are not using a width-cache-early-out here to allow for theme changes */
indicator->width = width
+ 2 * rc.theme->osd_window_switcher_padding
+ 2 * PADDING
+ 2 * rc.theme->osd_border_width;
wlr_scene_rect_set_size(indicator->border, indicator->width, indicator->height);