From 2690418551ad4cb11d758c288da49ccb9820ff94 Mon Sep 17 00:00:00 2001 From: Christian Soffke Date: Fri, 24 Apr 2026 12:49:50 +0200 Subject: [PATCH] plugins: imageviewer: use theme in all submenus Affects submenus "Toggle Slideshow Mode" and "Slideshow Time" that were left un-themed. Also prevents theme from being re-toggled when entering "Display Options" submenu. Change-Id: I3995d5eb12bbc8fb868c179db8043576eb675dbc --- apps/plugins/imageviewer/imageviewer.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/apps/plugins/imageviewer/imageviewer.c b/apps/plugins/imageviewer/imageviewer.c index 01683c8ace..b87a206a33 100644 --- a/apps/plugins/imageviewer/imageviewer.c +++ b/apps/plugins/imageviewer/imageviewer.c @@ -361,12 +361,6 @@ static int show_menu(void) /* return 1 to quit */ } } #endif -#if LCD_DEPTH > 1 - rb->lcd_set_backdrop(NULL); - rb->lcd_set_foreground(LCD_WHITE); - rb->lcd_set_background(LCD_BLACK); -#endif - rb->lcd_clear_display(); return 0; } @@ -776,9 +770,22 @@ static int scroll_bmp(struct image_info *info, bool initial_frame) #ifdef USEGSLIB grey_show(false); /* switch off greyscale overlay */ #endif - if (show_menu() == 1) + FOR_NB_SCREENS(i) + rb->viewportmanager_theme_enable(i, true, NULL); + int ret = show_menu(); + FOR_NB_SCREENS(i) + rb->viewportmanager_theme_undo(i, false); + + if (ret == 1) return PLUGIN_OK; +#if LCD_DEPTH > 1 + rb->lcd_set_backdrop(NULL); + rb->lcd_set_foreground(LCD_WHITE); + rb->lcd_set_background(LCD_BLACK); +#endif + rb->lcd_clear_display(); + #ifdef USEGSLIB grey_show(true); /* switch on greyscale overlay */ #else