diff options
Diffstat (limited to 'apps/gui/icon.c')
-rw-r--r-- | apps/gui/icon.c | 8 |
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 @@ | |||
26 | void screen_put_iconxy(struct screen * display, int x, int y, ICON icon) | 26 | void screen_put_iconxy(struct screen * display, int x, int y, ICON icon) |
27 | { | 27 | { |
28 | #ifdef HAVE_LCD_BITMAP | 28 | #ifdef HAVE_LCD_BITMAP |
29 | int width, height; | ||
29 | int xpos, ypos; | 30 | int xpos, ypos; |
31 | display->getstringsize((unsigned char *)"M", &width, &height); | ||
30 | xpos = x*CURSOR_WIDTH; | 32 | xpos = x*CURSOR_WIDTH; |
31 | ypos = y*display->char_height + display->getymargin(); | 33 | ypos = y*height + display->getymargin(); |
32 | 34 | ||
33 | if ( display->char_height > CURSOR_HEIGHT )/* center the cursor */ | 35 | if ( height > CURSOR_HEIGHT )/* center the cursor */ |
34 | ypos += (display->char_height - CURSOR_HEIGHT) / 2; | 36 | ypos += (height - CURSOR_HEIGHT) / 2; |
35 | if(icon==0)/* Don't display invalid icons */ | 37 | if(icon==0)/* Don't display invalid icons */ |
36 | screen_clear_area(display, xpos, ypos, CURSOR_WIDTH, CURSOR_HEIGHT); | 38 | screen_clear_area(display, xpos, ypos, CURSOR_WIDTH, CURSOR_HEIGHT); |
37 | else | 39 | else |