diff options
author | Christian Soffke <christian.soffke@gmail.com> | 2021-12-20 20:12:03 +0100 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2022-02-06 11:20:34 -0500 |
commit | 8d453ae9c3beef82bd61401af6216f74a400cbd0 (patch) | |
tree | 872bdc0769be213eceec8bb8548cf522ebb6629b /apps | |
parent | 04cbb3c7e4a79a6c06ad3cd585b8f0a54a8d0714 (diff) | |
download | rockbox-8d453ae9c3beef82bd61401af6216f74a400cbd0.tar.gz rockbox-8d453ae9c3beef82bd61401af6216f74a400cbd0.zip |
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
Diffstat (limited to 'apps')
-rw-r--r-- | apps/menu.c | 2 | ||||
-rw-r--r-- | apps/onplay.c | 1 | ||||
-rw-r--r-- | apps/playlist_viewer.c | 2 | ||||
-rw-r--r-- | apps/shortcuts.c | 4 |
4 files changed, 9 insertions, 0 deletions
diff --git a/apps/menu.c b/apps/menu.c index 802a16bbb8..ab5578dede 100644 --- a/apps/menu.c +++ b/apps/menu.c | |||
@@ -738,6 +738,8 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected, | |||
738 | if (menu_callback(ACTION_REDRAW, menu, &lists) != ACTION_REDRAW) | 738 | if (menu_callback(ACTION_REDRAW, menu, &lists) != ACTION_REDRAW) |
739 | continue; | 739 | continue; |
740 | 740 | ||
741 | |||
742 | gui_synclist_set_title(&lists, lists.title, lists.title_icon); | ||
741 | gui_synclist_draw(&lists); | 743 | gui_synclist_draw(&lists); |
742 | gui_synclist_speak_item(&lists); | 744 | gui_synclist_speak_item(&lists); |
743 | } | 745 | } |
diff --git a/apps/onplay.c b/apps/onplay.c index 61ef8acad5..ee183450fa 100644 --- a/apps/onplay.c +++ b/apps/onplay.c | |||
@@ -425,6 +425,7 @@ static bool playing_time(void) | |||
425 | if (global_settings.talk_menu) | 425 | if (global_settings.talk_menu) |
426 | gui_synclist_set_voice_callback(&pt_lists, playing_time_speak_info); | 426 | gui_synclist_set_voice_callback(&pt_lists, playing_time_speak_info); |
427 | gui_synclist_set_nb_items(&pt_lists, 8); | 427 | gui_synclist_set_nb_items(&pt_lists, 8); |
428 | gui_synclist_set_title(&pt_lists, str(LANG_PLAYING_TIME), NOICON); | ||
428 | gui_synclist_draw(&pt_lists); | 429 | gui_synclist_draw(&pt_lists); |
429 | gui_synclist_speak_item(&pt_lists); | 430 | gui_synclist_speak_item(&pt_lists); |
430 | while (true) { | 431 | while (true) { |
diff --git a/apps/playlist_viewer.c b/apps/playlist_viewer.c index b0f30ea8a1..6ebac1cb41 100644 --- a/apps/playlist_viewer.c +++ b/apps/playlist_viewer.c | |||
@@ -826,6 +826,7 @@ enum playlist_viewer_result playlist_viewer_ex(const char* filename) | |||
826 | int start_index = current_track->index; | 826 | int start_index = current_track->index; |
827 | if (!warn_on_pl_erase()) | 827 | if (!warn_on_pl_erase()) |
828 | { | 828 | { |
829 | gui_synclist_set_title(&playlist_lists, playlist_lists.title, playlist_lists.title_icon); | ||
829 | gui_synclist_draw(&playlist_lists); | 830 | gui_synclist_draw(&playlist_lists); |
830 | break; | 831 | break; |
831 | } | 832 | } |
@@ -875,6 +876,7 @@ enum playlist_viewer_result playlist_viewer_ex(const char* filename) | |||
875 | gui_synclist_set_icon_callback(&playlist_lists, | 876 | gui_synclist_set_icon_callback(&playlist_lists, |
876 | global_settings.playlist_viewer_icons? | 877 | global_settings.playlist_viewer_icons? |
877 | &playlist_callback_icons:NULL); | 878 | &playlist_callback_icons:NULL); |
879 | gui_synclist_set_title(&playlist_lists, playlist_lists.title, playlist_lists.title_icon); | ||
878 | gui_synclist_draw(&playlist_lists); | 880 | gui_synclist_draw(&playlist_lists); |
879 | gui_synclist_speak_item(&playlist_lists); | 881 | gui_synclist_speak_item(&playlist_lists); |
880 | break; | 882 | break; |
diff --git a/apps/shortcuts.c b/apps/shortcuts.c index 9f042a926a..f573d6fe4e 100644 --- a/apps/shortcuts.c +++ b/apps/shortcuts.c | |||
@@ -451,10 +451,14 @@ static int shortcut_menu_get_action(int action, struct gui_synclist *lists) | |||
451 | int selection = gui_synclist_get_sel_pos(lists); | 451 | int selection = gui_synclist_get_sel_pos(lists); |
452 | 452 | ||
453 | if (!yesno_pop(ID2P(LANG_REALLY_DELETE))) | 453 | if (!yesno_pop(ID2P(LANG_REALLY_DELETE))) |
454 | { | ||
455 | gui_synclist_set_title(lists, lists->title, lists->title_icon); | ||
454 | return ACTION_REDRAW; | 456 | return ACTION_REDRAW; |
457 | } | ||
455 | 458 | ||
456 | remove_shortcut(selection); | 459 | remove_shortcut(selection); |
457 | gui_synclist_set_nb_items(lists, shortcut_count); | 460 | gui_synclist_set_nb_items(lists, shortcut_count); |
461 | gui_synclist_set_title(lists, lists->title, lists->title_icon); | ||
458 | if (selection >= shortcut_count) | 462 | if (selection >= shortcut_count) |
459 | gui_synclist_select_item(lists, shortcut_count - 1); | 463 | gui_synclist_select_item(lists, shortcut_count - 1); |
460 | first_idx_to_writeback = 0; | 464 | first_idx_to_writeback = 0; |