1
0
Fork 0
forked from len0rd/rockbox

Move parts into the if, as they're unused outside of it

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20016 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Thomas Martitz 2009-02-16 08:34:56 +00:00
parent 54c2f49a69
commit 4395c12f4c

View file

@ -482,13 +482,15 @@ static void draw_progressbar(struct gui_wps *gwps,
struct wps_state *state = gwps->state;
struct progressbar *pb = wps_vp->pb;
int y = pb->y;
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;
if (y < 0) /* if Y was not set calculate by font height,Y is -line_number-1 */
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;
/* if Y was not set calculate by font height,Y is -line_number-1 */
y = (-y -1)*line_height + (0 > center ? 0 : center);
}
if (pb->have_bitmap_pb)
gui_bitmap_scrollbar_draw(display, pb->bm,