gui: list-skinned: fix scrollbar not disappearing

rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]> Wed, 27 May 2026 06:44:17 -0400
Newsgroups gmane.comp.systems.archos.rockbox.cvs
Message-ID <[email protected]>
commit 0c464c3d490b6f603b9d0020d2a7a072e671bf46
Author: Christian Soffke <[email protected]>
Date:   Wed May 27 12:17:54 2026 +0200

    gui: list-skinned: fix scrollbar not disappearing
    
    In some scenarios, when leaving a skinned
    list, the scroll bar remained visible.
    
    Change-Id: I0aa08cc95b4cf315834f83f57c09ed3e0f43de70

diff --git a/apps/gui/bitmap/list-skinned.c b/apps/gui/bitmap/list-skinned.c
index 23e37e06f9..3630f0ae9b 100644
--- a/apps/gui/bitmap/list-skinned.c
+++ b/apps/gui/bitmap/list-skinned.c
@@ -44,6 +44,7 @@
 
 static struct listitem_viewport_cfg *listcfg[NB_SCREENS] = {NULL};
 static struct gui_synclist *current_list;
+static bool needs_scrollbar[NB_SCREENS];
 
 static int current_row;
 static int current_column;
@@ -56,6 +57,7 @@ void skinlist_set_cfg(enum screen_type screen,
         if (listcfg[screen])
             screens[screen].scroll_stop_viewport(&listcfg[screen]->selected_item_vp.vp);
         listcfg[screen] = cfg;
+        needs_scrollbar[screen] = false;
         current_list = NULL;
         current_column = -1;
         current_row = -1;
@@ -145,7 +147,6 @@ int skinlist_get_line_count(enum screen_type screen, struct gui_synclist *list)
 
 static int current_item;
 static int current_nbitems;
-static bool needs_scrollbar[NB_SCREENS];
 bool skinlist_needs_scrollbar(enum screen_type screen)
 {
     return needs_scrollbar[screen];
-- 
rockbox-cvs mailing list
[email protected]
https://lists.haxx.se/mailman/listinfo/rockbox-cvs