mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-05-12 19:53:18 -04:00
Reduce list title glitches when switching between menus
Each time viewportmanager_theme_enable (or _undo) is called, the SBS title is reset, even if the theme remains enabled. Thus switching from one menu to another, if do_menu is called again, briefly results in an empty title before the correct one is displayed. Even unchanged titles will unnecessarily flash for a moment. Other theme elements that are drawn using conditions based on the title, may also appear glitchy. This patch adds a way to make the status bar title persist by copying it to a static buffer. Persistent titles are not reset by toggle_theme (although scrolling will be stopped in viewportmanager_theme_undo), so that the theme can immediately display the appropriate title in do_menu, simplelist_show_list, the yesno screen, or plugins that want to keep the theme enabled. Change-Id: I1ec8f233b730321793eb7d3cad51496ee1b35440
This commit is contained in:
parent
399230e9ec
commit
18dfd8f691
10 changed files with 88 additions and 29 deletions
|
|
@ -882,7 +882,8 @@ bool simplelist_show_list(struct simplelist_info *info)
|
|||
struct gui_synclist lists;
|
||||
int action, old_line_count = simplelist_line_count;
|
||||
list_get_name *getname;
|
||||
int line_count, ret = false;
|
||||
int line_count;
|
||||
bool ret = false;
|
||||
|
||||
if (info->get_name)
|
||||
{
|
||||
|
|
@ -896,7 +897,10 @@ bool simplelist_show_list(struct simplelist_info *info)
|
|||
}
|
||||
|
||||
FOR_NB_SCREENS(i)
|
||||
{
|
||||
sb_set_persistent_title(info->title, info->title_icon, i);
|
||||
viewportmanager_theme_enable(i, !info->hide_theme, NULL);
|
||||
}
|
||||
|
||||
gui_synclist_init(&lists, getname, info->callback_data,
|
||||
info->scroll_all, info->selection_size, NULL);
|
||||
|
|
@ -985,7 +989,10 @@ bool simplelist_show_list(struct simplelist_info *info)
|
|||
#endif
|
||||
|
||||
FOR_NB_SCREENS(i)
|
||||
{
|
||||
sb_set_persistent_title(info->title, info->title_icon, i);
|
||||
viewportmanager_theme_undo(i, false);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue