summaryrefslogtreecommitdiff
path: root/apps/gui/wps_parser.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-02-16 08:28:51 +0000
committerThomas Martitz <kugel@rockbox.org>2009-02-16 08:28:51 +0000
commit54c2f49a69936f7557dc22480edd74c9c8a4ddeb (patch)
tree603812fc0382e144e49b5d75b6c4830369b3ac2f /apps/gui/wps_parser.c
parenta2f92c9e17a5bc49c38ecba3605996cefcca7686 (diff)
downloadrockbox-54c2f49a69936f7557dc22480edd74c9c8a4ddeb.zip
rockbox-54c2f49a69936f7557dc22480edd74c9c8a4ddeb.tar.gz
rockbox-54c2f49a69936f7557dc22480edd74c9c8a4ddeb.tar.bz2
rockbox-54c2f49a69936f7557dc22480edd74c9c8a4ddeb.tar.xz
FS#9904 - Fix for FS#9894 - Position of the progress bar is not updated after the font is changed (with small changes by me)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20015 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/wps_parser.c')
-rw-r--r--apps/gui/wps_parser.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/gui/wps_parser.c b/apps/gui/wps_parser.c
index 0cc3ced..ba2e217 100644
--- a/apps/gui/wps_parser.c
+++ b/apps/gui/wps_parser.c
@@ -875,8 +875,8 @@ static int parse_progressbar(const char *wps_bufptr,
#else
int font_height = 8;
#endif
- int line_y_pos = font_height*(wps_data->num_lines -
- wps_data->viewports[wps_data->num_viewports].first_line);
+ int line_num = wps_data->num_lines -
+ wps_data->viewports[wps_data->num_viewports].first_line;
if (wps_data->progressbar_count >= MAX_PROGRESSBARS)
return WPS_ERROR_INVALID_PARAM;
@@ -889,7 +889,7 @@ static int parse_progressbar(const char *wps_bufptr,
pb->x = 0;
pb->width = vp->width;
pb->height = SYSFONT_HEIGHT-2;
- pb->y = line_y_pos + (font_height-pb->height)/2;
+ pb->y = -line_num - 1; /* Will be computed during the rendering */
wps_data->viewports[wps_data->num_viewports].pb = pb;
wps_data->progressbar_count++;
@@ -934,7 +934,7 @@ static int parse_progressbar(const char *wps_bufptr,
if (LIST_VALUE_PARSED(set, PB_Y)) /* y */
pb->y = y;
else
- pb->y = line_y_pos + (font_height-pb->height)/2;
+ pb->y = -line_num - 1; /* Will be computed during the rendering */
wps_data->viewports[wps_data->num_viewports].pb = pb;
wps_data->progressbar_count++;