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:
Christian Soffke 2025-12-24 11:38:39 +01:00 • committed by Solomon Peachy
parent 399230e9ec
commit 18dfd8f691
10 changed files with 88 additions and 29 deletions

View file

@ -1026,6 +1026,8 @@ struct plugin_api {
/* new stuff at the end, sort into place next time
the API gets incompatible */
bool (*sb_set_persistent_title)(const char* title, enum themable_icons icon,
enum screen_type screen);
};
/* plugin header */