diff options
author | Daniel Stenberg <daniel@haxx.se> | 2002-09-12 13:33:59 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2002-09-12 13:33:59 +0000 |
commit | 93b231c69366563ba441dc4907bfb036fe3b4c55 (patch) | |
tree | 0783ad028211f59e63925a354e4260a7209ffa24 /apps/recorder/icons.c | |
parent | 5ed78ea80cdaa0ede4df89568f0781fa477a5738 (diff) | |
download | rockbox-93b231c69366563ba441dc4907bfb036fe3b4c55.tar.gz rockbox-93b231c69366563ba441dc4907bfb036fe3b4c55.zip |
Greg Haerr's new loadable font. No more #ifdef font-style, removed old
propfont and loadable font code. New font file format.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2269 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/recorder/icons.c')
-rw-r--r-- | apps/recorder/icons.c | 23 |
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 | } |