summaryrefslogtreecommitdiff
path: root/apps/gui/statusbar-skinned.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/statusbar-skinned.c')
-rw-r--r--apps/gui/statusbar-skinned.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/apps/gui/statusbar-skinned.c b/apps/gui/statusbar-skinned.c
index 0902950599..af02b9b54d 100644
--- a/apps/gui/statusbar-skinned.c
+++ b/apps/gui/statusbar-skinned.c
@@ -86,15 +86,29 @@ void sb_skin_data_load(enum screen_type screen, const char *buf, bool isfile)
86 } 86 }
87 /* hide this viewport, forever */ 87 /* hide this viewport, forever */
88 vp->hidden_flags = VP_NEVER_VISIBLE; 88 vp->hidden_flags = VP_NEVER_VISIBLE;
89 sb_set_info_vp(screen, VP_INFO_LABEL|VP_DEFAULT_LABEL);
89 } 90 }
90 91
91 if (!success && isfile) 92 if (!success && isfile)
92 sb_create_from_settings(screen); 93 sb_create_from_settings(screen);
93} 94}
94 95static char infovp_label[NB_SCREENS];
96static char oldinfovp_label[NB_SCREENS];
97void sb_set_info_vp(enum screen_type screen, char label)
98{
99 infovp_label[screen] = label;
100}
101
95struct viewport *sb_skin_get_info_vp(enum screen_type screen) 102struct viewport *sb_skin_get_info_vp(enum screen_type screen)
96{ 103{
97 return &find_viewport(VP_INFO_LABEL, sb_skin[screen].data)->vp; 104 if (oldinfovp_label[screen] != infovp_label[screen])
105 {
106 /* UI viewport changed, so force a redraw */
107 oldinfovp_label[screen] = infovp_label[screen];
108 viewportmanager_theme_enable(screen, false, NULL);
109 viewportmanager_theme_undo(screen, true);
110 }
111 return &find_viewport(infovp_label[screen], sb_skin[screen].data)->vp;
98} 112}
99 113
100#if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1) 114#if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)