Display day of week as one character to conserve space on screen
This commit is contained in:
parent
0e761c4dc0
commit
c34fbf9ff6
@ -140,6 +140,34 @@ void WatchFaceGravel::Refresh() {
|
||||
if (currentDate.IsUpdated()) {
|
||||
Controllers::DateTime::Days dayOfWeek = dateTimeController.DayOfWeek();
|
||||
lv_label_set_text_fmt(labelDate, "%s %d %s", dateTimeController.DayOfWeekShortToStringLow(dayOfWeek), dateTimeController.Day(), dateTimeController.MonthShortToString());
|
||||
char dayChar = ' ';
|
||||
switch(dateTimeController.DayOfWeek()) {
|
||||
case (Controllers::DateTime::Days::Sunday):
|
||||
dayChar = 'S';
|
||||
break;
|
||||
case (Controllers::DateTime::Days::Monday):
|
||||
dayChar = 'M';
|
||||
break;
|
||||
case (Controllers::DateTime::Days::Tuesday):
|
||||
dayChar = 'T';
|
||||
break;
|
||||
case (Controllers::DateTime::Days::Wednesday):
|
||||
dayChar = 'W';
|
||||
break;
|
||||
case (Controllers::DateTime::Days::Thursday):
|
||||
dayChar = 'R';
|
||||
break;
|
||||
case (Controllers::DateTime::Days::Friday):
|
||||
dayChar = 'F';
|
||||
break;
|
||||
case (Controllers::DateTime::Days::Saturday):
|
||||
dayChar = 'A';
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
lv_label_set_text_fmt(labelDate, "%c %d %s", dayChar, dateTimeController.Day(), dateTimeController.MonthShortToString());
|
||||
}
|
||||
lv_obj_realign(labelDate);
|
||||
}
|
||||
|
@ -99,7 +99,7 @@
|
||||
"sources": [
|
||||
{
|
||||
"file": "fonts/SquareRegular.ttf",
|
||||
"symbols": "0123456789:--ADFJMNOPSTWYabcdeghlnoprtuvy "
|
||||
"symbols": "0123456789ABCDEFGJlMNOPRSTUVWYabceglnoprtuvy "
|
||||
}
|
||||
],
|
||||
"bpp": 2,
|
||||
|
Loading…
Reference in New Issue
Block a user