diff options
Diffstat (limited to 'apps/gui')
-rw-r--r-- | apps/gui/gwps-common.c | 8 | ||||
-rw-r--r-- | apps/gui/icon.c | 8 |
2 files changed, 9 insertions, 7 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c index b250674d47..37306fb0e3 100644 --- a/apps/gui/gwps-common.c +++ b/apps/gui/gwps-common.c | |||
@@ -1750,7 +1750,7 @@ bool gui_wps_refresh(struct gui_wps *gwps, int ffwd_offset, | |||
1750 | #endif | 1750 | #endif |
1751 | update_line = true; | 1751 | update_line = true; |
1752 | } | 1752 | } |
1753 | if (flags & refresh_mode & WPS_REFRESH_PEAK_METER && display->height >= LCD_HEIGHT) { | 1753 | if (flags & refresh_mode & WPS_REFRESH_PEAK_METER) { |
1754 | /* peak meter */ | 1754 | /* peak meter */ |
1755 | int peak_meter_y; | 1755 | int peak_meter_y; |
1756 | 1756 | ||
@@ -1761,12 +1761,12 @@ bool gui_wps_refresh(struct gui_wps *gwps, int ffwd_offset, | |||
1761 | line so that it is only displayed if no status bar is | 1761 | line so that it is only displayed if no status bar is |
1762 | visible. If so we neither want do draw nor enable the | 1762 | visible. If so we neither want do draw nor enable the |
1763 | peak meter. */ | 1763 | peak meter. */ |
1764 | if (peak_meter_y + h <= LCD_HEIGHT) { | 1764 | if (peak_meter_y + h <= display->height) { |
1765 | /* found a line with a peak meter -> remember that we must | 1765 | /* found a line with a peak meter -> remember that we must |
1766 | enable it later */ | 1766 | enable it later */ |
1767 | enable_pm = true; | 1767 | enable_pm = true; |
1768 | peak_meter_draw(0, peak_meter_y, LCD_WIDTH, | 1768 | peak_meter_screen(gwps->display, 0, peak_meter_y, |
1769 | MIN(h, LCD_HEIGHT - peak_meter_y)); | 1769 | MIN(h, display->height - peak_meter_y)); |
1770 | } | 1770 | } |
1771 | } | 1771 | } |
1772 | #else | 1772 | #else |
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 |