diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2010-06-08 07:24:42 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2010-06-08 07:24:42 +0000 |
commit | fa99c614b90c17c79f75b54a68e311324eda4184 (patch) | |
tree | 6d05551295385eebd802ca156cbf7bf83b078fdf /apps/gui/skin_engine | |
parent | 67277f16888598ab211ad0f84cbfe490effbc9e1 (diff) | |
download | rockbox-fa99c614b90c17c79f75b54a68e311324eda4184.tar.gz rockbox-fa99c614b90c17c79f75b54a68e311324eda4184.zip |
hopefully fix the problem with lines in viewports being pushed down one line.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26682 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/skin_engine')
-rw-r--r-- | apps/gui/skin_engine/skin_display.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c index 6759521473..3d3a654c30 100644 --- a/apps/gui/skin_engine/skin_display.c +++ b/apps/gui/skin_engine/skin_display.c | |||
@@ -1272,7 +1272,10 @@ static bool skin_redraw(struct gui_wps *gwps, unsigned refresh_mode) | |||
1272 | 1272 | ||
1273 | /* loop over the lines for this viewport */ | 1273 | /* loop over the lines for this viewport */ |
1274 | struct skin_line *line; | 1274 | struct skin_line *line; |
1275 | int line_count = 0; | 1275 | /* %V() doesnt eat the \n which means the first line of text |
1276 | * is actually going to be one line down. so set line_count to -1 | ||
1277 | * unless we are using the default viewport which doesnt have this problem */ | ||
1278 | int line_count = skin_viewport->label==VP_DEFAULT_LABEL?0:-1; | ||
1276 | 1279 | ||
1277 | for (line = skin_viewport->lines; line; line = line->next, line_count++) | 1280 | for (line = skin_viewport->lines; line; line = line->next, line_count++) |
1278 | { | 1281 | { |
@@ -1332,7 +1335,7 @@ static bool skin_redraw(struct gui_wps *gwps, unsigned refresh_mode) | |||
1332 | } | 1335 | } |
1333 | #endif | 1336 | #endif |
1334 | 1337 | ||
1335 | if (update_line && !hidden_vp && | 1338 | if (line_count>= 0 && update_line && !hidden_vp && |
1336 | /* conditionals clear the line which means if the %Vd is put into the default | 1339 | /* conditionals clear the line which means if the %Vd is put into the default |
1337 | viewport there will be a blank line. | 1340 | viewport there will be a blank line. |
1338 | To get around this we dont allow any actual drawing to happen in the | 1341 | To get around this we dont allow any actual drawing to happen in the |