summaryrefslogtreecommitdiff
path: root/apps/menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/menu.c')
-rw-r--r--apps/menu.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/menu.c b/apps/menu.c
index ac5c857a70..96b0bfdf02 100644
--- a/apps/menu.c
+++ b/apps/menu.c
@@ -29,11 +29,11 @@
29#include "panic.h" 29#include "panic.h"
30#include "settings.h" 30#include "settings.h"
31#include "status.h" 31#include "status.h"
32#include "screens.h"
32 33
33#ifdef HAVE_LCD_BITMAP 34#ifdef HAVE_LCD_BITMAP
34#include "icons.h" 35#include "icons.h"
35#include "widgets.h" 36#include "widgets.h"
36#include "screens.h"
37#endif 37#endif
38 38
39struct menu { 39struct menu {
@@ -95,7 +95,7 @@ void put_cursorxy(int x, int y, bool on)
95#ifdef HAVE_LCD_BITMAP 95#ifdef HAVE_LCD_BITMAP
96 int fh, fw; 96 int fh, fw;
97 int xpos, ypos; 97 int xpos, ypos;
98 lcd_getfontsize(FONT_UI, &fw, &fh); 98 lcd_getstringsize("A", &fw, &fh);
99 xpos = x*6; 99 xpos = x*6;
100 ypos = y*fh + lcd_getymargin(); 100 ypos = y*fh + lcd_getymargin();
101 if ( fh > 8 ) 101 if ( fh > 8 )
@@ -134,7 +134,8 @@ static void menu_draw(int m)
134#ifdef HAVE_LCD_BITMAP 134#ifdef HAVE_LCD_BITMAP
135 int fw, fh; 135 int fw, fh;
136 int menu_lines; 136 int menu_lines;
137 lcd_getfontsize(FONT_UI, &fw, &fh); 137 lcd_setfont(FONT_UI);
138 lcd_getstringsize("A", &fw, &fh);
138 if (global_settings.statusbar) 139 if (global_settings.statusbar)
139 menu_lines = (LCD_HEIGHT - STATUSBAR_HEIGHT) / fh; 140 menu_lines = (LCD_HEIGHT - STATUSBAR_HEIGHT) / fh;
140 else 141 else
@@ -147,7 +148,6 @@ static void menu_draw(int m)
147 lcd_clear_display(); /* ...then clean the screen */ 148 lcd_clear_display(); /* ...then clean the screen */
148#ifdef HAVE_LCD_BITMAP 149#ifdef HAVE_LCD_BITMAP
149 lcd_setmargins(MARGIN_X,MARGIN_Y); /* leave room for cursor and icon */ 150 lcd_setmargins(MARGIN_X,MARGIN_Y); /* leave room for cursor and icon */
150 lcd_setfont(FONT_UI);
151#endif 151#endif
152 /* correct cursor pos if out of screen */ 152 /* correct cursor pos if out of screen */
153 if (menus[m].cursor - menus[m].top >= menu_lines) 153 if (menus[m].cursor - menus[m].top >= menu_lines)
@@ -184,7 +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_getfontsize(FONT_UI, &fw, &fh); 187 lcd_getstringsize("A", &fw, &fh);
188 if (global_settings.statusbar) 188 if (global_settings.statusbar)
189 menu_lines = (LCD_HEIGHT - STATUSBAR_HEIGHT) / fh; 189 menu_lines = (LCD_HEIGHT - STATUSBAR_HEIGHT) / fh;
190 else 190 else