summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Häggqvist <rasher@rasher.dk>2005-06-22 21:30:34 +0000
committerJonas Häggqvist <rasher@rasher.dk>2005-06-22 21:30:34 +0000
commit97a1cf80f7334925110e510590b701ec510d42d7 (patch)
treea3ef1d23c0120b259908923b14962719ecb6cbbf
parent10426dbe22ef031a4711c7d40967c9449e0dd5b9 (diff)
downloadrockbox-97a1cf80f7334925110e510590b701ec510d42d7.tar.gz
rockbox-97a1cf80f7334925110e510590b701ec510d42d7.zip
Mind the line-height
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6826 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/debug_menu.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index f71c6682d2..a99631b7af 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -227,7 +227,10 @@ bool dbg_audio_thread(void)
char buf[32];
int button;
int line;
+ int center, height;
bool done = false;
+ lcd_getstringsize(" ", &center, &height);
+ center = (height/2)-3;
ticks = boost_ticks = 0;
@@ -254,7 +257,7 @@ bool dbg_audio_thread(void)
lcd_puts(0, line++, buf);
/* Playable space left */
- scrollbar(0, line*8, LCD_WIDTH, 6, PCMBUF_SIZE, 0,
+ scrollbar(0, line*height + center, LCD_WIDTH, 6, PCMBUF_SIZE, 0,
PCMBUF_SIZE-audiobuffer_free, HORIZONTAL);
line++;
@@ -262,7 +265,7 @@ bool dbg_audio_thread(void)
lcd_puts(0, line++, buf);
/* Playable space left */
- scrollbar(0, line*8, LCD_WIDTH, 6, codecbuflen, 0,
+ scrollbar(0, line*height + center, LCD_WIDTH, 6, codecbuflen, 0,
codecbufused, HORIZONTAL);
line++;