summaryrefslogtreecommitdiff
path: root/apps/recorder/icons.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/recorder/icons.c')
-rw-r--r--apps/recorder/icons.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/apps/recorder/icons.c b/apps/recorder/icons.c
index 0501a3f0c0..fbfaf6cd8c 100644
--- a/apps/recorder/icons.c
+++ b/apps/recorder/icons.c
@@ -16,8 +16,9 @@
16 * KIND, either express or implied. 16 * KIND, either express or implied.
17 * 17 *
18 ****************************************************************************/ 18 ****************************************************************************/
19#include <lcd.h>
20#include <string.h> 19#include <string.h>
20#include "lcd.h"
21#include "font.h"
21#include "kernel.h" 22#include "kernel.h"
22#include "sprintf.h" 23#include "sprintf.h"
23#include "rtc.h" 24#include "rtc.h"
@@ -233,15 +234,7 @@ void statusbar_icon_volume(int percent)
233 /* display volume lever numerical? */ 234 /* display volume lever numerical? */
234 if (TIME_BEFORE(current_tick,switch_tick)) { 235 if (TIME_BEFORE(current_tick,switch_tick)) {
235 snprintf(buffer, sizeof(buffer), "%2d", percent); 236 snprintf(buffer, sizeof(buffer), "%2d", percent);
236#if defined(LCD_PROPFONTS) 237 lcd_getstringsize(buffer, FONT_UI, &width, &height);
237 lcd_getstringsize(buffer, 0, &width, &height);
238#elif defined(LOADABLE_FONTS)
239 font = lcd_getcurrentldfont();
240 lcd_getstringsize(buffer, font, &width, &height);
241#else
242 width = 6*strlen(buffer);
243 height = 8;
244#endif
245 if (height <= STATUSBAR_HEIGHT) 238 if (height <= STATUSBAR_HEIGHT)
246 lcd_putsxy(ICON_VOLUME_X_POS + ICON_VOLUME_WIDTH / 2 - 239 lcd_putsxy(ICON_VOLUME_X_POS + ICON_VOLUME_WIDTH / 2 -
247 width/2, STATUSBAR_Y_POS, buffer, 0); 240 width/2, STATUSBAR_Y_POS, buffer, 0);
@@ -316,15 +309,7 @@ void statusbar_time(int hour, int minute)
316 strncpy(buffer, "--:--", sizeof buffer); 309 strncpy(buffer, "--:--", sizeof buffer);
317 } 310 }
318 311
319#if defined(LCD_PROPFONTS) 312 lcd_getstringsize(buffer, FONT_UI, &width, &height);
320 lcd_getstringsize(buffer, 0, &width, &height);
321#elif defined(LOADABLE_FONTS)
322 font = lcd_getcurrentldfont();
323 lcd_getstringsize(buffer, font, &width, &height);
324#else
325 width = 6*strlen(buffer);
326 height = 8;
327#endif
328 if (height <= STATUSBAR_HEIGHT) 313 if (height <= STATUSBAR_HEIGHT)
329 lcd_putsxy(TIME_X_END - width, STATUSBAR_Y_POS, buffer, 0); 314 lcd_putsxy(TIME_X_END - width, STATUSBAR_Y_POS, buffer, 0);
330} 315}