diff options
Diffstat (limited to 'apps/screens.c')
-rw-r--r-- | apps/screens.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/apps/screens.c b/apps/screens.c index 257093856f..c35d20c37e 100644 --- a/apps/screens.c +++ b/apps/screens.c | |||
@@ -845,11 +845,15 @@ void splash(int ticks, /* how long the splash is displayed */ | |||
845 | if(center && (y > 2)) { | 845 | if(center && (y > 2)) { |
846 | if(maxw < (LCD_WIDTH -4)) { | 846 | if(maxw < (LCD_WIDTH -4)) { |
847 | int xx = (LCD_WIDTH-maxw)/2 - 2; | 847 | int xx = (LCD_WIDTH-maxw)/2 - 2; |
848 | lcd_clearrect(xx, y-2, maxw+4, LCD_HEIGHT-y*2+4); | 848 | lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
849 | lcd_fillrect(xx, y-2, maxw+4, LCD_HEIGHT-y*2+4); | ||
850 | lcd_set_drawmode(DRMODE_SOLID); | ||
849 | lcd_drawrect(xx, y-2, maxw+4, LCD_HEIGHT-y*2+4); | 851 | lcd_drawrect(xx, y-2, maxw+4, LCD_HEIGHT-y*2+4); |
850 | } | 852 | } |
851 | else { | 853 | else { |
852 | lcd_clearrect(0, y-2, LCD_WIDTH, LCD_HEIGHT-y*2+4); | 854 | lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
855 | lcd_fillrect(0, y-2, LCD_WIDTH, LCD_HEIGHT-y*2+4); | ||
856 | lcd_set_drawmode(DRMODE_SOLID); | ||
853 | lcd_drawline(0, y-2, LCD_WIDTH-1, y-2); | 857 | lcd_drawline(0, y-2, LCD_WIDTH-1, y-2); |
854 | lcd_drawline(0, LCD_HEIGHT-y+2, LCD_WIDTH-1, LCD_HEIGHT-y+2); | 858 | lcd_drawline(0, LCD_HEIGHT-y+2, LCD_WIDTH-1, LCD_HEIGHT-y+2); |
855 | } | 859 | } |
@@ -965,6 +969,7 @@ bool set_time_screen(const char* string, struct tm *tm) | |||
965 | unsigned int width, height; | 969 | unsigned int width, height; |
966 | unsigned int separator_width, weekday_width; | 970 | unsigned int separator_width, weekday_width; |
967 | unsigned int line_height, prev_line_height; | 971 | unsigned int line_height, prev_line_height; |
972 | int lastmode = lcd_get_drawmode(); | ||
968 | 973 | ||
969 | static const int dayname[] = { | 974 | static const int dayname[] = { |
970 | LANG_WEEKDAY_SUNDAY, | 975 | LANG_WEEKDAY_SUNDAY, |
@@ -1108,10 +1113,12 @@ bool set_time_screen(const char* string, struct tm *tm) | |||
1108 | cursor[5][INDEX_Y] = cursor[0][INDEX_Y] + prev_line_height; | 1113 | cursor[5][INDEX_Y] = cursor[0][INDEX_Y] + prev_line_height; |
1109 | cursor[5][INDEX_WIDTH] = width; | 1114 | cursor[5][INDEX_WIDTH] = width; |
1110 | 1115 | ||
1111 | lcd_invertrect(cursor[cursorpos][INDEX_X], | 1116 | lcd_set_drawmode(DRMODE_COMPLEMENT); |
1112 | cursor[cursorpos][INDEX_Y] + lcd_getymargin(), | 1117 | lcd_fillrect(cursor[cursorpos][INDEX_X], |
1113 | cursor[cursorpos][INDEX_WIDTH], | 1118 | cursor[cursorpos][INDEX_Y] + lcd_getymargin(), |
1114 | line_height); | 1119 | cursor[cursorpos][INDEX_WIDTH], |
1120 | line_height); | ||
1121 | lcd_set_drawmode(DRMODE_SOLID); | ||
1115 | 1122 | ||
1116 | lcd_puts(0, 4, str(LANG_TIME_SET)); | 1123 | lcd_puts(0, 4, str(LANG_TIME_SET)); |
1117 | lcd_puts(0, 5, str(LANG_TIME_REVERT)); | 1124 | lcd_puts(0, 5, str(LANG_TIME_REVERT)); |
@@ -1203,6 +1210,7 @@ bool set_time_screen(const char* string, struct tm *tm) | |||
1203 | } | 1210 | } |
1204 | } | 1211 | } |
1205 | 1212 | ||
1213 | lcd_set_drawmode(lastmode); | ||
1206 | return false; | 1214 | return false; |
1207 | } | 1215 | } |
1208 | #endif /* defined(HAVE_LCD_BITMAP) && defined (HAVE_RTC) */ | 1216 | #endif /* defined(HAVE_LCD_BITMAP) && defined (HAVE_RTC) */ |