mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
Wrapping backwards in menus didn't work well when using a large font
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4055 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
ba2c197f2f
commit
f1659a3957
1 changed files with 14 additions and 1 deletions
15
apps/menu.c
15
apps/menu.c
|
@ -184,6 +184,7 @@ static void put_cursor(int m, int target)
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
int fw, fh;
|
int fw, fh;
|
||||||
int menu_lines;
|
int menu_lines;
|
||||||
|
lcd_setfont(FONT_UI);
|
||||||
lcd_getstringsize("A", &fw, &fh);
|
lcd_getstringsize("A", &fw, &fh);
|
||||||
if (global_settings.statusbar)
|
if (global_settings.statusbar)
|
||||||
menu_lines = (LCD_HEIGHT - STATUSBAR_HEIGHT) / fh;
|
menu_lines = (LCD_HEIGHT - STATUSBAR_HEIGHT) / fh;
|
||||||
|
@ -245,6 +246,18 @@ void menu_exit(int m)
|
||||||
int menu_show(int m)
|
int menu_show(int m)
|
||||||
{
|
{
|
||||||
bool exit = false;
|
bool exit = false;
|
||||||
|
#ifdef HAVE_LCD_BITMAP
|
||||||
|
int fw, fh;
|
||||||
|
int menu_lines;
|
||||||
|
lcd_setfont(FONT_UI);
|
||||||
|
lcd_getstringsize("A", &fw, &fh);
|
||||||
|
if (global_settings.statusbar)
|
||||||
|
menu_lines = (LCD_HEIGHT - STATUSBAR_HEIGHT) / fh;
|
||||||
|
else
|
||||||
|
menu_lines = LCD_HEIGHT/fh;
|
||||||
|
#else
|
||||||
|
int menu_lines = MENU_LINES;
|
||||||
|
#endif
|
||||||
|
|
||||||
menu_draw(m);
|
menu_draw(m);
|
||||||
|
|
||||||
|
@ -264,7 +277,7 @@ int menu_show(int m)
|
||||||
else {
|
else {
|
||||||
/* move to bottom */
|
/* move to bottom */
|
||||||
#ifdef HAVE_RECORDER_KEYPAD
|
#ifdef HAVE_RECORDER_KEYPAD
|
||||||
menus[m].top = menus[m].itemcount-9;
|
menus[m].top = menus[m].itemcount-(menu_lines+1);
|
||||||
#else
|
#else
|
||||||
menus[m].top = menus[m].itemcount-3;
|
menus[m].top = menus[m].itemcount-3;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue