gui: skinned list: always set cfg to NULL when toggling theme

rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]> Wed, 27 May 2026 13:35:41 -0400
Newsgroups gmane.comp.systems.archos.rockbox.cvs
Message-ID <[email protected]>
commit 358c6056efab45e31e6178336309fa19d33e4486
Author: Christian Soffke <[email protected]>
Date:   Wed May 27 19:07:42 2026 +0200

    gui: skinned list: always set cfg to NULL when toggling theme
    
    Takes care of disabling scroll bars when the current activity
    doesn't change, but the theme is toggled. Applies to confirmation
    prompts, for example.
    
    Since we're updating the skin immediately afterwards, the cfg
    will be reset as needed.
    
    Change-Id: I8a62b6b4ad0abf5176ab6b3e39281021108cb59f

diff --git a/apps/gui/viewport.c b/apps/gui/viewport.c
index 0c52b7afe3..5fcc2a17a4 100644
--- a/apps/gui/viewport.c
+++ b/apps/gui/viewport.c
@@ -113,6 +113,7 @@ static void toggle_theme(enum screen_type screen, bool force)
         if (!sb_get_persistent_title(i))
             sb_set_title_text(NULL, Icon_NOICON, i);
     }
+    skinlist_set_cfg(screen, NULL);
     toggle_events(enable_event);
 
     if (is_theme_enabled(screen))
@@ -163,7 +164,6 @@ static void toggle_theme(enum screen_type screen, bool force)
         screens[screen].backdrop_show(NULL);
 #endif
         screens[screen].scroll_stop();
-        skinlist_set_cfg(screen, NULL);
         skin_is_dirty(screen); /* remove dirty flag */
     }
     /* let list initialize viewport in case viewport dimensions is changed. */
-- 
rockbox-cvs mailing list
[email protected]
https://lists.haxx.se/mailman/listinfo/rockbox-cvs