diff options
Diffstat (limited to 'apps/wps.c')
-rw-r--r-- | apps/wps.c | 46 |
1 files changed, 14 insertions, 32 deletions
diff --git a/apps/wps.c b/apps/wps.c index 4ac2476da7..d10eb92655 100644 --- a/apps/wps.c +++ b/apps/wps.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include "file.h" | 23 | #include "file.h" |
24 | #include "lcd.h" | 24 | #include "lcd.h" |
25 | #include "font.h" | ||
25 | #include "backlight.h" | 26 | #include "backlight.h" |
26 | #include "button.h" | 27 | #include "button.h" |
27 | #include "kernel.h" | 28 | #include "kernel.h" |
@@ -40,10 +41,6 @@ | |||
40 | #include "icons.h" | 41 | #include "icons.h" |
41 | #endif | 42 | #endif |
42 | 43 | ||
43 | #ifdef LOADABLE_FONTS | ||
44 | #include "ajf.h" | ||
45 | #endif | ||
46 | |||
47 | #define FF_REWIND_MAX_PERCENT 3 /* cap ff/rewind step size at max % of file */ | 44 | #define FF_REWIND_MAX_PERCENT 3 /* cap ff/rewind step size at max % of file */ |
48 | /* 3% of 30min file == 54s step size */ | 45 | /* 3% of 30min file == 54s step size */ |
49 | 46 | ||
@@ -634,21 +631,17 @@ bool f2_screen(void) | |||
634 | char buf[32]; | 631 | char buf[32]; |
635 | 632 | ||
636 | /* Get the font height */ | 633 | /* Get the font height */ |
637 | #ifdef LCD_PROPFONTS | 634 | lcd_getstringsize("A",FONT_UI,&w,&h); |
638 | lcd_getstringsize("A",0,&w,&h); | ||
639 | #else | ||
640 | lcd_getfontsize(0,&w,&h); | ||
641 | #endif | ||
642 | 635 | ||
643 | lcd_stop_scroll(); | 636 | lcd_stop_scroll(); |
644 | 637 | ||
645 | while (!exit) { | 638 | while (!exit) { |
646 | lcd_clear_display(); | 639 | lcd_clear_display(); |
647 | 640 | ||
648 | lcd_putsxy(0, LCD_HEIGHT/2 - h*2, "Shuffle", 0); | 641 | lcd_putsxy(0, LCD_HEIGHT/2 - h*2, "Shuffle", FONT_UI); |
649 | lcd_putsxy(0, LCD_HEIGHT/2 - h, "mode:", 0); | 642 | lcd_putsxy(0, LCD_HEIGHT/2 - h, "mode:", FONT_UI); |
650 | lcd_putsxy(0, LCD_HEIGHT/2, | 643 | lcd_putsxy(0, LCD_HEIGHT/2, |
651 | global_settings.playlist_shuffle ? "on" : "off", 0); | 644 | global_settings.playlist_shuffle ? "on" : "off", FONT_UI); |
652 | lcd_bitmap(bitmap_icons_7x8[Icon_FastBackward], | 645 | lcd_bitmap(bitmap_icons_7x8[Icon_FastBackward], |
653 | LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8, true); | 646 | LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8, true); |
654 | 647 | ||
@@ -656,13 +649,8 @@ bool f2_screen(void) | |||
656 | global_settings.mp3filter ? "on" : "off"); | 649 | global_settings.mp3filter ? "on" : "off"); |
657 | 650 | ||
658 | /* Get the string width and height */ | 651 | /* Get the string width and height */ |
659 | #ifdef LCD_PROPFONTS | 652 | lcd_getstringsize(buf,FONT_UI,&w,&h); |
660 | lcd_getstringsize(buf,0,&w,&h); | 653 | lcd_putsxy((LCD_WIDTH-w)/2, LCD_HEIGHT - h, buf, FONT_UI); |
661 | #else | ||
662 | lcd_getfontsize(0,&w,&h); | ||
663 | w *= strlen(buf); | ||
664 | #endif | ||
665 | lcd_putsxy((LCD_WIDTH-w)/2, LCD_HEIGHT - h, buf, 0); | ||
666 | lcd_bitmap(bitmap_icons_7x8[Icon_DownArrow], | 654 | lcd_bitmap(bitmap_icons_7x8[Icon_DownArrow], |
667 | LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8, true); | 655 | LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8, true); |
668 | 656 | ||
@@ -717,26 +705,20 @@ bool f3_screen(void) | |||
717 | char* ptr; | 705 | char* ptr; |
718 | 706 | ||
719 | ptr = "Status"; | 707 | ptr = "Status"; |
720 | #ifdef LCD_PROPFONTS | 708 | lcd_getstringsize(ptr,FONT_UI,&w,&h); |
721 | lcd_getstringsize(ptr,0,&w,&h); | ||
722 | #else | ||
723 | lcd_getfontsize(0,&w,&h); | ||
724 | w *= strlen(ptr); | ||
725 | #endif | ||
726 | |||
727 | lcd_clear_display(); | 709 | lcd_clear_display(); |
728 | 710 | ||
729 | lcd_putsxy(0, LCD_HEIGHT/2 - h*2, "Scroll", 0); | 711 | lcd_putsxy(0, LCD_HEIGHT/2 - h*2, "Scroll", FONT_UI); |
730 | lcd_putsxy(0, LCD_HEIGHT/2 - h, "bar:", 0); | 712 | lcd_putsxy(0, LCD_HEIGHT/2 - h, "bar:", FONT_UI); |
731 | lcd_putsxy(0, LCD_HEIGHT/2, | 713 | lcd_putsxy(0, LCD_HEIGHT/2, |
732 | global_settings.scrollbar ? "on" : "off", 0); | 714 | global_settings.scrollbar ? "on" : "off", FONT_UI); |
733 | lcd_bitmap(bitmap_icons_7x8[Icon_FastBackward], | 715 | lcd_bitmap(bitmap_icons_7x8[Icon_FastBackward], |
734 | LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8, true); | 716 | LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8, true); |
735 | 717 | ||
736 | lcd_putsxy(LCD_WIDTH - w, LCD_HEIGHT/2 - h*2, ptr, 0); | 718 | lcd_putsxy(LCD_WIDTH - w, LCD_HEIGHT/2 - h*2, ptr, FONT_UI); |
737 | lcd_putsxy(LCD_WIDTH - w, LCD_HEIGHT/2 - h, "bar:", 0); | 719 | lcd_putsxy(LCD_WIDTH - w, LCD_HEIGHT/2 - h, "bar:", FONT_UI); |
738 | lcd_putsxy(LCD_WIDTH - w, LCD_HEIGHT/2, | 720 | lcd_putsxy(LCD_WIDTH - w, LCD_HEIGHT/2, |
739 | global_settings.statusbar ? "on" : "off", 0 ); | 721 | global_settings.statusbar ? "on" : "off", FONT_UI); |
740 | lcd_bitmap(bitmap_icons_7x8[Icon_FastForward], | 722 | lcd_bitmap(bitmap_icons_7x8[Icon_FastForward], |
741 | LCD_WIDTH/2 + 8, LCD_HEIGHT/2 - 4, 7, 8, true); | 723 | LCD_WIDTH/2 + 8, LCD_HEIGHT/2 - 4, 7, 8, true); |
742 | lcd_update(); | 724 | lcd_update(); |