diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2009-07-08 00:51:03 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2009-07-08 00:51:03 +0000 |
commit | a06f6eedae542afc48cf0aa5e30b4647e18547a2 (patch) | |
tree | 1b14ae67f85e37e9ed4186094c2cf5de8c8b453b /apps/gui/wps_parser.c | |
parent | 008f611bca3173e21027a568540281c0d7d03ef2 (diff) | |
download | rockbox-a06f6eedae542afc48cf0aa5e30b4647e18547a2.tar.gz rockbox-a06f6eedae542afc48cf0aa5e30b4647e18547a2.zip |
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.c | 22 |
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, | |||
1682 | /* Initialise the first (default) viewport */ | 1682 | /* Initialise the first (default) viewport */ |
1683 | wps_data->viewports[0].vp.x = 0; | 1683 | wps_data->viewports[0].vp.x = 0; |
1684 | wps_data->viewports[0].vp.width = display->getwidth(); | 1684 | wps_data->viewports[0].vp.width = display->getwidth(); |
1685 | if (!global_settings.statusbar) | 1685 | wps_data->viewports[0].vp.height = display->getheight(); |
1686 | switch (statusbar_position(display->screen_type)) | ||
1686 | { | 1687 | { |
1687 | wps_data->viewports[0].vp.y = 0; | 1688 | case STATUSBAR_OFF: |
1688 | wps_data->viewports[0].vp.height = display->getheight(); | 1689 | wps_data->viewports[0].vp.y = 0; |
1689 | } | 1690 | break; |
1690 | else | 1691 | case STATUSBAR_TOP: |
1691 | { | 1692 | wps_data->viewports[0].vp.y = STATUSBAR_HEIGHT; |
1692 | wps_data->viewports[0].vp.y = STATUSBAR_HEIGHT; | 1693 | wps_data->viewports[0].vp.height -= STATUSBAR_HEIGHT; |
1693 | wps_data->viewports[0].vp.height = display->getheight() - | 1694 | break; |
1694 | STATUSBAR_HEIGHT; | 1695 | case STATUSBAR_BOTTOM: |
1696 | wps_data->viewports[0].vp.y = 0; | ||
1697 | wps_data->viewports[0].vp.height -= STATUSBAR_HEIGHT; | ||
1698 | break; | ||
1695 | } | 1699 | } |
1696 | #ifdef HAVE_LCD_BITMAP | 1700 | #ifdef HAVE_LCD_BITMAP |
1697 | wps_data->viewports[0].vp.font = FONT_UI; | 1701 | wps_data->viewports[0].vp.font = FONT_UI; |