summaryrefslogtreecommitdiffstats
path: root/apps/gui/icon.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/icon.c')
-rw-r--r--apps/gui/icon.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/gui/icon.c b/apps/gui/icon.c
index 0cdee11b8e..ef6f61f94e 100644
--- a/apps/gui/icon.c
+++ b/apps/gui/icon.c
@@ -26,12 +26,14 @@
void screen_put_iconxy(struct screen * display, int x, int y, ICON icon)
{
#ifdef HAVE_LCD_BITMAP
+ int width, height;
int xpos, ypos;
+ display->getstringsize((unsigned char *)"M", &width, &height);
xpos = x*CURSOR_WIDTH;
- ypos = y*display->char_height + display->getymargin();
+ ypos = y*height + display->getymargin();
- if ( display->char_height > CURSOR_HEIGHT )/* center the cursor */
- ypos += (display->char_height - CURSOR_HEIGHT) / 2;
+ if ( height > CURSOR_HEIGHT )/* center the cursor */
+ ypos += (height - CURSOR_HEIGHT) / 2;
if(icon==0)/* Don't display invalid icons */
screen_clear_area(display, xpos, ypos, CURSOR_WIDTH, CURSOR_HEIGHT);
else