Fix glitches with custom list title viewports
Elements were not being drawn correctly or title text appeared delayed in several places when using themes with a custom viewport for list titles. E.g.: - after deleting a shortcut - when returning from a warning screen in Playlist Viewer - returning to some Settings screens - in "Playing time" screen Change-Id: I8ab07a31d4b6f290e089ecd7857f43ec195a06e0
This commit is contained in:
parent
04cbb3c7e4
commit
8d453ae9c3
4 changed files with 9 additions and 0 deletions
|
@ -738,6 +738,8 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
|
|||
if (menu_callback(ACTION_REDRAW, menu, &lists) != ACTION_REDRAW)
|
||||
continue;
|
||||
|
||||
|
||||
gui_synclist_set_title(&lists, lists.title, lists.title_icon);
|
||||
gui_synclist_draw(&lists);
|
||||
gui_synclist_speak_item(&lists);
|
||||
}
|
||||
|
|
|
@ -425,6 +425,7 @@ static bool playing_time(void)
|
|||
if (global_settings.talk_menu)
|
||||
gui_synclist_set_voice_callback(&pt_lists, playing_time_speak_info);
|
||||
gui_synclist_set_nb_items(&pt_lists, 8);
|
||||
gui_synclist_set_title(&pt_lists, str(LANG_PLAYING_TIME), NOICON);
|
||||
gui_synclist_draw(&pt_lists);
|
||||
gui_synclist_speak_item(&pt_lists);
|
||||
while (true) {
|
||||
|
|
|
@ -826,6 +826,7 @@ enum playlist_viewer_result playlist_viewer_ex(const char* filename)
|
|||
int start_index = current_track->index;
|
||||
if (!warn_on_pl_erase())
|
||||
{
|
||||
gui_synclist_set_title(&playlist_lists, playlist_lists.title, playlist_lists.title_icon);
|
||||
gui_synclist_draw(&playlist_lists);
|
||||
break;
|
||||
}
|
||||
|
@ -875,6 +876,7 @@ enum playlist_viewer_result playlist_viewer_ex(const char* filename)
|
|||
gui_synclist_set_icon_callback(&playlist_lists,
|
||||
global_settings.playlist_viewer_icons?
|
||||
&playlist_callback_icons:NULL);
|
||||
gui_synclist_set_title(&playlist_lists, playlist_lists.title, playlist_lists.title_icon);
|
||||
gui_synclist_draw(&playlist_lists);
|
||||
gui_synclist_speak_item(&playlist_lists);
|
||||
break;
|
||||
|
|
|
@ -451,10 +451,14 @@ static int shortcut_menu_get_action(int action, struct gui_synclist *lists)
|
|||
int selection = gui_synclist_get_sel_pos(lists);
|
||||
|
||||
if (!yesno_pop(ID2P(LANG_REALLY_DELETE)))
|
||||
{
|
||||
gui_synclist_set_title(lists, lists->title, lists->title_icon);
|
||||
return ACTION_REDRAW;
|
||||
}
|
||||
|
||||
remove_shortcut(selection);
|
||||
gui_synclist_set_nb_items(lists, shortcut_count);
|
||||
gui_synclist_set_title(lists, lists->title, lists->title_icon);
|
||||
if (selection >= shortcut_count)
|
||||
gui_synclist_select_item(lists, shortcut_count - 1);
|
||||
first_idx_to_writeback = 0;
|
||||
|
|
Loading…
Reference in a new issue