diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/menu.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/apps/menu.c b/apps/menu.c index b7bc542bb0..c7e3381985 100644 --- a/apps/menu.c +++ b/apps/menu.c | |||
@@ -184,6 +184,7 @@ static void put_cursor(int m, int target) | |||
184 | #ifdef HAVE_LCD_BITMAP | 184 | #ifdef HAVE_LCD_BITMAP |
185 | int fw, fh; | 185 | int fw, fh; |
186 | int menu_lines; | 186 | int menu_lines; |
187 | lcd_setfont(FONT_UI); | ||
187 | lcd_getstringsize("A", &fw, &fh); | 188 | lcd_getstringsize("A", &fw, &fh); |
188 | if (global_settings.statusbar) | 189 | if (global_settings.statusbar) |
189 | menu_lines = (LCD_HEIGHT - STATUSBAR_HEIGHT) / fh; | 190 | menu_lines = (LCD_HEIGHT - STATUSBAR_HEIGHT) / fh; |
@@ -245,6 +246,18 @@ void menu_exit(int m) | |||
245 | int menu_show(int m) | 246 | int menu_show(int m) |
246 | { | 247 | { |
247 | bool exit = false; | 248 | bool exit = false; |
249 | #ifdef HAVE_LCD_BITMAP | ||
250 | int fw, fh; | ||
251 | int menu_lines; | ||
252 | lcd_setfont(FONT_UI); | ||
253 | lcd_getstringsize("A", &fw, &fh); | ||
254 | if (global_settings.statusbar) | ||
255 | menu_lines = (LCD_HEIGHT - STATUSBAR_HEIGHT) / fh; | ||
256 | else | ||
257 | menu_lines = LCD_HEIGHT/fh; | ||
258 | #else | ||
259 | int menu_lines = MENU_LINES; | ||
260 | #endif | ||
248 | 261 | ||
249 | menu_draw(m); | 262 | menu_draw(m); |
250 | 263 | ||
@@ -264,7 +277,7 @@ int menu_show(int m) | |||
264 | else { | 277 | else { |
265 | /* move to bottom */ | 278 | /* move to bottom */ |
266 | #ifdef HAVE_RECORDER_KEYPAD | 279 | #ifdef HAVE_RECORDER_KEYPAD |
267 | menus[m].top = menus[m].itemcount-9; | 280 | menus[m].top = menus[m].itemcount-(menu_lines+1); |
268 | #else | 281 | #else |
269 | menus[m].top = menus[m].itemcount-3; | 282 | menus[m].top = menus[m].itemcount-3; |
270 | #endif | 283 | #endif |