osd-thumbnail: s/thumb_theme/switcher_them/

Just to align with other parts of the codebase.
This commit is contained in:
tokyo4j 2025-11-01 22:56:45 +09:00 committed by Johan Malm
parent cd1a823fee
commit 43c6e1dc22

View file

@ -178,21 +178,21 @@ static void
get_items_geometry(struct output *output, struct theme *theme, get_items_geometry(struct output *output, struct theme *theme,
int nr_thumbs, int *nr_rows, int *nr_cols) int nr_thumbs, int *nr_rows, int *nr_cols)
{ {
struct window_switcher_thumbnail_theme *thumb_theme = struct window_switcher_thumbnail_theme *switcher_theme =
&theme->osd_window_switcher_thumbnail; &theme->osd_window_switcher_thumbnail;
int output_width = output->wlr_output->width / output->wlr_output->scale; int output_width = output->wlr_output->width / output->wlr_output->scale;
int max_bg_width = thumb_theme->max_width; int max_bg_width = switcher_theme->max_width;
if (thumb_theme->max_width_is_percent) { if (switcher_theme->max_width_is_percent) {
max_bg_width = output_width * thumb_theme->max_width / 100; max_bg_width = output_width * switcher_theme->max_width / 100;
} }
*nr_rows = 1; *nr_rows = 1;
*nr_cols = nr_thumbs; *nr_cols = nr_thumbs;
while (1) { while (1) {
assert(*nr_rows <= nr_thumbs); assert(*nr_rows <= nr_thumbs);
int bg_width = *nr_cols * thumb_theme->item_width int bg_width = *nr_cols * switcher_theme->item_width
+ theme->osd_border_width + thumb_theme->padding; + theme->osd_border_width + switcher_theme->padding;
if (bg_width < max_bg_width) { if (bg_width < max_bg_width) {
break; break;
} }