summaryrefslogtreecommitdiff
path: root/apps/gui
diff options
context:
space:
mode:
authorTeruaki Kawashima <teru@rockbox.org>2010-03-07 12:51:23 +0000
committerTeruaki Kawashima <teru@rockbox.org>2010-03-07 12:51:23 +0000
commitf50885534ec6fa78c2c89e275c5ffd592be5cd2e (patch)
treeb60a7d0f7a1c5124cddedeac585c0bb1c1a11d4f /apps/gui
parent1e9789879ff620c78b594801bf37abc256bdcc2b (diff)
downloadrockbox-f50885534ec6fa78c2c89e275c5ffd592be5cd2e.zip
rockbox-f50885534ec6fa78c2c89e275c5ffd592be5cd2e.tar.gz
rockbox-f50885534ec6fa78c2c89e275c5ffd592be5cd2e.tar.bz2
rockbox-f50885534ec6fa78c2c89e275c5ffd592be5cd2e.tar.xz
Pass width instead of x+width to ab_draw_markers()/cue_draw_markers() and don't recalculate the width in these functions.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25053 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui')
-rw-r--r--apps/gui/skin_engine/skin_display.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c
index 97f9ee3..845ea18 100644
--- a/apps/gui/skin_engine/skin_display.c
+++ b/apps/gui/skin_engine/skin_display.c
@@ -124,14 +124,14 @@ static void draw_progressbar(struct gui_wps *gwps,
int y = pb->y, height = pb->height;
unsigned long length, elapsed;
- if (pb->height < 0 && !pb->have_bitmap_pb)
+ if (height < 0)
height = font_get(wps_vp->vp.font)->height;
if (y < 0)
{
int line_height = font_get(wps_vp->vp.font)->height;
/* center the pb in the line, but only if the line is higher than the pb */
- int center = (line_height-pb->height)/2;
+ int center = (line_height-height)/2;
/* if Y was not set calculate by font height,Y is -line_number-1 */
y = (-y -1)*line_height + (0 > center ? 0 : center);
}
@@ -160,12 +160,12 @@ static void draw_progressbar(struct gui_wps *gwps,
#ifdef AB_REPEAT_ENABLE
if (ab_repeat_mode_enabled())
ab_draw_markers(display, id3->length,
- pb->x, pb->x + pb->width, y, height);
+ pb->x, y, pb->width, height);
#endif
if (id3->cuesheet)
cue_draw_markers(display, id3->cuesheet, id3->length,
- pb->x, pb->x + pb->width, y+1, height-2);
+ pb->x, y+1, pb->width, height-2);
}
}