1
0
Fork 0
forked from len0rd/rockbox

Fix the display of peakmeters and progress bars (without a custom y position) inside a viewport (broken by r16735).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16739 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dave Chapman 2008-03-22 10:56:03 +00:00
parent 036d8cc7e7
commit bc227c0aa2

View file

@ -1975,7 +1975,7 @@ bool gui_wps_refresh(struct gui_wps *gwps,
{ {
/* the progressbar should be alone on its line */ /* the progressbar should be alone on its line */
update_line = false; update_line = false;
draw_progressbar(gwps, line); draw_progressbar(gwps, line - data->viewports[v].first_line);
} }
/* peakmeter */ /* peakmeter */
@ -1985,7 +1985,7 @@ bool gui_wps_refresh(struct gui_wps *gwps,
update_line = false; update_line = false;
int h = font_get(display->getfont())->height; int h = font_get(display->getfont())->height;
int peak_meter_y = display->getymargin() + line * h; int peak_meter_y = display->getymargin() + (line - data->viewports[v].first_line)* h;
/* The user might decide to have the peak meter in the last /* The user might decide to have the peak meter in the last
line so that it is only displayed if no status bar is line so that it is only displayed if no status bar is