summaryrefslogtreecommitdiff
path: root/apps/gui/wps_parser.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2009-07-08 00:51:03 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2009-07-08 00:51:03 +0000
commita06f6eedae542afc48cf0aa5e30b4647e18547a2 (patch)
tree1b14ae67f85e37e9ed4186094c2cf5de8c8b453b /apps/gui/wps_parser.c
parent008f611bca3173e21027a568540281c0d7d03ef2 (diff)
cleanup the remote+main statusbar handling a bit, and fix the bug where the remote wps might reserve the space for the statusbar even if its disabled
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21709 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/wps_parser.c')
-rw-r--r--apps/gui/wps_parser.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/apps/gui/wps_parser.c b/apps/gui/wps_parser.c
index 14c8d30c6a..09bcab8443 100644
--- a/apps/gui/wps_parser.c
+++ b/apps/gui/wps_parser.c
@@ -1682,16 +1682,20 @@ bool wps_data_load(struct wps_data *wps_data,
/* Initialise the first (default) viewport */
wps_data->viewports[0].vp.x = 0;
wps_data->viewports[0].vp.width = display->getwidth();
- if (!global_settings.statusbar)
+ wps_data->viewports[0].vp.height = display->getheight();
+ switch (statusbar_position(display->screen_type))
{
- wps_data->viewports[0].vp.y = 0;
- wps_data->viewports[0].vp.height = display->getheight();
- }
- else
- {
- wps_data->viewports[0].vp.y = STATUSBAR_HEIGHT;
- wps_data->viewports[0].vp.height = display->getheight() -
- STATUSBAR_HEIGHT;
+ case STATUSBAR_OFF:
+ wps_data->viewports[0].vp.y = 0;
+ break;
+ case STATUSBAR_TOP:
+ wps_data->viewports[0].vp.y = STATUSBAR_HEIGHT;
+ wps_data->viewports[0].vp.height -= STATUSBAR_HEIGHT;
+ break;
+ case STATUSBAR_BOTTOM:
+ wps_data->viewports[0].vp.y = 0;
+ wps_data->viewports[0].vp.height -= STATUSBAR_HEIGHT;
+ break;
}
#ifdef HAVE_LCD_BITMAP
wps_data->viewports[0].vp.font = FONT_UI;