summaryrefslogtreecommitdiff
path: root/apps/plugins/text_viewer/tv_display.c
diff options
context:
space:
mode:
authorYoshihisa Uchida <uchida@rockbox.org>2010-07-07 12:07:23 +0000
committerYoshihisa Uchida <uchida@rockbox.org>2010-07-07 12:07:23 +0000
commit276dfa23b611a85bedebceb986d0b4549a934187 (patch)
tree5efe86b94c65c6aa05d6472064651066a3830d6a /apps/plugins/text_viewer/tv_display.c
parente5a257607dd93afe239a03dff0d093dfb3af64be (diff)
downloadrockbox-276dfa23b611a85bedebceb986d0b4549a934187.tar.gz
rockbox-276dfa23b611a85bedebceb986d0b4549a934187.zip
text viewer: fixed the following bugs.
- the statusbar of the preferences is not correct when the settings file loads. - overlaps the statusbar of the skin and default one. (FS#11455) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27334 a1c6a512-1295-4272-9138-f99709370657
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