summaryrefslogtreecommitdiff
path: root/apps/gui/gwps-common.c
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2008-03-22 10:56:03 +0000
committerDave Chapman <dave@dchapman.com>2008-03-22 10:56:03 +0000
commitbc227c0aa2849e125d2eb00cd14660c56e966ae6 (patch)
treefd350a3022881a16c2de2a24610272fa5ae69cfd /apps/gui/gwps-common.c
parent036d8cc7e75354c666afae57bf3cccf02ca406bd (diff)
downloadrockbox-bc227c0aa2849e125d2eb00cd14660c56e966ae6.tar.gz
rockbox-bc227c0aa2849e125d2eb00cd14660c56e966ae6.zip
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
Diffstat (limited to 'apps/gui/gwps-common.c')
-rw-r--r--apps/gui/gwps-common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c
index 3c3bad3056..744f86e42a 100644
--- a/apps/gui/gwps-common.c
+++ b/apps/gui/gwps-common.c
@@ -1975,7 +1975,7 @@ bool gui_wps_refresh(struct gui_wps *gwps,
1975 { 1975 {
1976 /* the progressbar should be alone on its line */ 1976 /* the progressbar should be alone on its line */
1977 update_line = false; 1977 update_line = false;
1978 draw_progressbar(gwps, line); 1978 draw_progressbar(gwps, line - data->viewports[v].first_line);
1979 } 1979 }
1980 1980
1981 /* peakmeter */ 1981 /* peakmeter */
@@ -1985,7 +1985,7 @@ bool gui_wps_refresh(struct gui_wps *gwps,
1985 update_line = false; 1985 update_line = false;
1986 1986
1987 int h = font_get(display->getfont())->height; 1987 int h = font_get(display->getfont())->height;
1988 int peak_meter_y = display->getymargin() + line * h; 1988 int peak_meter_y = display->getymargin() + (line - data->viewports[v].first_line)* h;
1989 1989
1990 /* The user might decide to have the peak meter in the last 1990 /* The user might decide to have the peak meter in the last
1991 line so that it is only displayed if no status bar is 1991 line so that it is only displayed if no status bar is