summaryrefslogtreecommitdiff
path: root/apps/plugins/text_viewer/tv_display.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/text_viewer/tv_display.c')
-rw-r--r--apps/plugins/text_viewer/tv_display.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/apps/plugins/text_viewer/tv_display.c b/apps/plugins/text_viewer/tv_display.c
index 8cf7e11419..57474cdc0f 100644
--- a/apps/plugins/text_viewer/tv_display.c
+++ b/apps/plugins/text_viewer/tv_display.c
@@ -314,16 +314,19 @@ void tv_get_drawarea_info(int *width, int *cols, int *rows)
314static void tv_change_viewport(void) 314static void tv_change_viewport(void)
315{ 315{
316#ifdef HAVE_LCD_BITMAP 316#ifdef HAVE_LCD_BITMAP
317 struct viewport vp;
318
319 if (is_initialized_vp) 317 if (is_initialized_vp)
320 rb->viewportmanager_theme_undo(SCREEN_MAIN, false); 318 rb->viewportmanager_theme_undo(SCREEN_MAIN, false);
321 else 319 else
322 is_initialized_vp = true; 320 is_initialized_vp = true;
323 321
324 rb->viewportmanager_theme_enable(SCREEN_MAIN, preferences->statusbar, &vp); 322 if (preferences->statusbar)
325 vp_info = vp; 323 rb->memcpy(&vp_info, rb->sb_skin_get_info_vp(SCREEN_MAIN), sizeof(struct viewport));
324 else
325 rb->viewport_set_defaults(&vp_info, SCREEN_MAIN);
326
327 rb->viewportmanager_theme_enable(SCREEN_MAIN, preferences->statusbar, &vp_info);
326 vp_info.flags &= ~VP_FLAG_ALIGNMENT_MASK; 328 vp_info.flags &= ~VP_FLAG_ALIGNMENT_MASK;
329 display->set_viewport(&vp_info);
327#else 330#else
328 if (!is_initialized_vp) 331 if (!is_initialized_vp)
329 { 332 {
@@ -411,7 +414,8 @@ void tv_finalize_display(void)
411 } 414 }
412 415
413 /* undo viewport */ 416 /* undo viewport */
414 rb->viewportmanager_theme_undo(SCREEN_MAIN, false); 417 if (is_initialized_vp)
418 rb->viewportmanager_theme_undo(SCREEN_MAIN, false);
415#endif 419#endif
416} 420}
417 421