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:
parent
54c2f49a69
commit
4395c12f4c
1 changed files with 7 additions and 5 deletions
|
|
@ -482,13 +482,15 @@ static void draw_progressbar(struct gui_wps *gwps,
|
||||||
struct wps_state *state = gwps->state;
|
struct wps_state *state = gwps->state;
|
||||||
struct progressbar *pb = wps_vp->pb;
|
struct progressbar *pb = wps_vp->pb;
|
||||||
int y = pb->y;
|
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 */
|
if (y < 0)
|
||||||
int center = (line_height-pb->height)/2;
|
{
|
||||||
|
int line_height = font_get(wps_vp->vp.font)->height;
|
||||||
if (y < 0) /* if Y was not set calculate by font height,Y is -line_number-1 */
|
/* 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);
|
y = (-y -1)*line_height + (0 > center ? 0 : center);
|
||||||
|
}
|
||||||
|
|
||||||
if (pb->have_bitmap_pb)
|
if (pb->have_bitmap_pb)
|
||||||
gui_bitmap_scrollbar_draw(display, pb->bm,
|
gui_bitmap_scrollbar_draw(display, pb->bm,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue