forked from len0rd/rockbox
text viewer: fix the statusbar is displayed when the global statusbar settings is STATUSBAR_OFF.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27349 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
bc46541bcd
commit
771dc22aa1
1 changed files with 5 additions and 2 deletions
|
|
@ -314,17 +314,20 @@ void tv_get_drawarea_info(int *width, int *cols, int *rows)
|
||||||
static void tv_change_viewport(void)
|
static void tv_change_viewport(void)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
|
bool show_statusbar = (rb->global_settings->statusbar != STATUSBAR_OFF &&
|
||||||
|
preferences->statusbar);
|
||||||
|
|
||||||
if (is_initialized_vp)
|
if (is_initialized_vp)
|
||||||
rb->viewportmanager_theme_undo(SCREEN_MAIN, false);
|
rb->viewportmanager_theme_undo(SCREEN_MAIN, false);
|
||||||
else
|
else
|
||||||
is_initialized_vp = true;
|
is_initialized_vp = true;
|
||||||
|
|
||||||
if (preferences->statusbar)
|
if (show_statusbar)
|
||||||
rb->memcpy(&vp_info, rb->sb_skin_get_info_vp(SCREEN_MAIN), sizeof(struct viewport));
|
rb->memcpy(&vp_info, rb->sb_skin_get_info_vp(SCREEN_MAIN), sizeof(struct viewport));
|
||||||
else
|
else
|
||||||
rb->viewport_set_defaults(&vp_info, SCREEN_MAIN);
|
rb->viewport_set_defaults(&vp_info, SCREEN_MAIN);
|
||||||
|
|
||||||
rb->viewportmanager_theme_enable(SCREEN_MAIN, preferences->statusbar, &vp_info);
|
rb->viewportmanager_theme_enable(SCREEN_MAIN, show_statusbar, &vp_info);
|
||||||
vp_info.flags &= ~VP_FLAG_ALIGNMENT_MASK;
|
vp_info.flags &= ~VP_FLAG_ALIGNMENT_MASK;
|
||||||
display->set_viewport(&vp_info);
|
display->set_viewport(&vp_info);
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue