mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
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:
parent
e5a257607d
commit
276dfa23b6
3 changed files with 11 additions and 7 deletions
|
@ -59,7 +59,7 @@ enum plugin_status plugin_start(const void* file)
|
||||||
while (!done) {
|
while (!done) {
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
if (rb->global_settings->statusbar != STATUSBAR_OFF && preferences->statusbar)
|
if (rb->global_settings->statusbar != STATUSBAR_OFF && preferences->statusbar)
|
||||||
rb->gui_syncstatusbar_draw(rb->statusbars, true);
|
rb->sb_skin_update(SCREEN_MAIN, true);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (display_update)
|
if (display_update)
|
||||||
|
|
|
@ -314,16 +314,19 @@ 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
|
||||||
struct viewport vp;
|
|
||||||
|
|
||||||
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;
|
||||||
|
|
||||||
rb->viewportmanager_theme_enable(SCREEN_MAIN, preferences->statusbar, &vp);
|
if (preferences->statusbar)
|
||||||
vp_info = vp;
|
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;
|
vp_info.flags &= ~VP_FLAG_ALIGNMENT_MASK;
|
||||||
|
display->set_viewport(&vp_info);
|
||||||
#else
|
#else
|
||||||
if (!is_initialized_vp)
|
if (!is_initialized_vp)
|
||||||
{
|
{
|
||||||
|
@ -411,6 +414,7 @@ void tv_finalize_display(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* undo viewport */
|
/* undo viewport */
|
||||||
|
if (is_initialized_vp)
|
||||||
rb->viewportmanager_theme_undo(SCREEN_MAIN, false);
|
rb->viewportmanager_theme_undo(SCREEN_MAIN, false);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -189,7 +189,7 @@ static bool tv_read_preferences(int pfd, int version, struct tv_preferences *pre
|
||||||
prefs->autoscroll_speed = *p++;
|
prefs->autoscroll_speed = *p++;
|
||||||
|
|
||||||
if (version > 2)
|
if (version > 2)
|
||||||
prefs->horizontal_scrollbar = (*p != 0);
|
prefs->horizontal_scrollbar = (*p++ != 0);
|
||||||
else
|
else
|
||||||
prefs->horizontal_scrollbar = false;
|
prefs->horizontal_scrollbar = false;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue