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
This commit is contained in:
Yoshihisa Uchida 2010-07-07 12:07:23 +00:00
parent e5a257607d
commit 276dfa23b6
3 changed files with 11 additions and 7 deletions

View file

@ -59,7 +59,7 @@ enum plugin_status plugin_start(const void* file)
while (!done) {
#ifdef HAVE_LCD_BITMAP
if (rb->global_settings->statusbar != STATUSBAR_OFF && preferences->statusbar)
rb->gui_syncstatusbar_draw(rb->statusbars, true);
rb->sb_skin_update(SCREEN_MAIN, true);
#endif
if (display_update)

View file

@ -314,16 +314,19 @@ void tv_get_drawarea_info(int *width, int *cols, int *rows)
static void tv_change_viewport(void)
{
#ifdef HAVE_LCD_BITMAP
struct viewport vp;
if (is_initialized_vp)
rb->viewportmanager_theme_undo(SCREEN_MAIN, false);
else
is_initialized_vp = true;
rb->viewportmanager_theme_enable(SCREEN_MAIN, preferences->statusbar, &vp);
vp_info = vp;
if (preferences->statusbar)
rb->memcpy(&vp_info, rb->sb_skin_get_info_vp(SCREEN_MAIN), sizeof(struct viewport));
else
rb->viewport_set_defaults(&vp_info, SCREEN_MAIN);
rb->viewportmanager_theme_enable(SCREEN_MAIN, preferences->statusbar, &vp_info);
vp_info.flags &= ~VP_FLAG_ALIGNMENT_MASK;
display->set_viewport(&vp_info);
#else
if (!is_initialized_vp)
{
@ -411,7 +414,8 @@ void tv_finalize_display(void)
}
/* undo viewport */
rb->viewportmanager_theme_undo(SCREEN_MAIN, false);
if (is_initialized_vp)
rb->viewportmanager_theme_undo(SCREEN_MAIN, false);
#endif
}

View file

@ -189,7 +189,7 @@ static bool tv_read_preferences(int pfd, int version, struct tv_preferences *pre
prefs->autoscroll_speed = *p++;
if (version > 2)
prefs->horizontal_scrollbar = (*p != 0);
prefs->horizontal_scrollbar = (*p++ != 0);
else
prefs->horizontal_scrollbar = false;