summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter D'Hoye <peter.dhoye@gmail.com>2008-05-19 21:37:43 +0000
committerPeter D'Hoye <peter.dhoye@gmail.com>2008-05-19 21:37:43 +0000
commit3dd52e3798516f5fa358d8660fa75b176b9cfb43 (patch)
treec68fe7c8d5785a89a3e43b2f377e1fda0f8f2dd7
parent1d28fe7d798eaad14e7e4553d4af6c8082309126 (diff)
Fix FS #9003: only add the extra space in the jewels menu when there's room for it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17585 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/jewels.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/plugins/jewels.c b/apps/plugins/jewels.c
index 7eec89eaa3..a0e6479a10 100644
--- a/apps/plugins/jewels.c
+++ b/apps/plugins/jewels.c
@@ -644,6 +644,7 @@ static enum menu_result jewels_showmenu(struct jewels_menu* menu,
int w, h;
int firstline;
int adj;
+ int extraline = LCD_HEIGHT <= ((menu->itemcnt+2)*FONT_HEIGHT) ? 0 : 1;
/* handle menu command */
switch(cmd) {
@@ -686,7 +687,8 @@ static enum menu_result jewels_showmenu(struct jewels_menu* menu,
if(i == menu->selected) {
rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
}
- rb->lcd_putsxy((LCD_WIDTH-MENU_WIDTH)/2, (firstline+i+2)*FONT_HEIGHT,
+ rb->lcd_putsxy((LCD_WIDTH-MENU_WIDTH)/2,
+ (firstline+i+1+extraline)*FONT_HEIGHT,
menu->items[i].text);
if(i == menu->selected) {
rb->lcd_set_drawmode(DRMODE_SOLID);