Analog, Digital: lower case day/month names
This commit is contained in:
parent
b572e2ec91
commit
628bbad683
2 changed files with 9 additions and 6 deletions
|
@ -121,7 +121,8 @@ WatchFaceAnalog::WatchFaceAnalog(Controllers::DateTime& dateTimeController,
|
||||||
|
|
||||||
label_date_day = lv_label_create(lv_scr_act(), nullptr);
|
label_date_day = lv_label_create(lv_scr_act(), nullptr);
|
||||||
lv_obj_set_style_local_text_color(label_date_day, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, Colors::orange);
|
lv_obj_set_style_local_text_color(label_date_day, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, Colors::orange);
|
||||||
lv_label_set_text_fmt(label_date_day, "%s\n%02i", dateTimeController.DayOfWeekShortToString(), dateTimeController.Day());
|
Controllers::DateTime::Days dayOfWeek = dateTimeController.DayOfWeek();
|
||||||
|
lv_label_set_text_fmt(label_date_day, "%s\n%02i", dateTimeController.DayOfWeekShortToStringLow(dayOfWeek), dateTimeController.Day());
|
||||||
lv_label_set_align(label_date_day, LV_LABEL_ALIGN_CENTER);
|
lv_label_set_align(label_date_day, LV_LABEL_ALIGN_CENTER);
|
||||||
lv_obj_align(label_date_day, nullptr, LV_ALIGN_CENTER, 50, 0);
|
lv_obj_align(label_date_day, nullptr, LV_ALIGN_CENTER, 50, 0);
|
||||||
|
|
||||||
|
@ -265,7 +266,8 @@ void WatchFaceAnalog::Refresh() {
|
||||||
|
|
||||||
currentDate = std::chrono::time_point_cast<std::chrono::days>(currentDateTime.Get());
|
currentDate = std::chrono::time_point_cast<std::chrono::days>(currentDateTime.Get());
|
||||||
if (currentDate.IsUpdated()) {
|
if (currentDate.IsUpdated()) {
|
||||||
lv_label_set_text_fmt(label_date_day, "%s\n%02i", dateTimeController.DayOfWeekShortToString(), dateTimeController.Day());
|
Controllers::DateTime::Days dayOfWeek = dateTimeController.DayOfWeek();
|
||||||
|
lv_label_set_text_fmt(label_date_day, "%s\n%02i", dateTimeController.DayOfWeekShortToStringLow(dayOfWeek), dateTimeController.Day());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -137,18 +137,19 @@ void WatchFaceDigital::Refresh() {
|
||||||
if (currentDate.IsUpdated()) {
|
if (currentDate.IsUpdated()) {
|
||||||
uint16_t year = dateTimeController.Year();
|
uint16_t year = dateTimeController.Year();
|
||||||
uint8_t day = dateTimeController.Day();
|
uint8_t day = dateTimeController.Day();
|
||||||
|
Controllers::DateTime::Days dayOfWeek = dateTimeController.DayOfWeek();
|
||||||
if (settingsController.GetClockType() == Controllers::Settings::ClockType::H24) {
|
if (settingsController.GetClockType() == Controllers::Settings::ClockType::H24) {
|
||||||
lv_label_set_text_fmt(label_date,
|
lv_label_set_text_fmt(label_date,
|
||||||
"%s %d %s %d",
|
"%s %d %s %d",
|
||||||
dateTimeController.DayOfWeekShortToString(),
|
dateTimeController.DayOfWeekShortToStringLow(dayOfWeek),
|
||||||
day,
|
day,
|
||||||
dateTimeController.MonthShortToString(),
|
dateTimeController.MonthShortToStringLow(),
|
||||||
year);
|
year);
|
||||||
} else {
|
} else {
|
||||||
lv_label_set_text_fmt(label_date,
|
lv_label_set_text_fmt(label_date,
|
||||||
"%s %s %d %d",
|
"%s %s %d %d",
|
||||||
dateTimeController.DayOfWeekShortToString(),
|
dateTimeController.DayOfWeekShortToStringLow(dayOfWeek),
|
||||||
dateTimeController.MonthShortToString(),
|
dateTimeController.MonthShortToStringLow(),
|
||||||
day,
|
day,
|
||||||
year);
|
year);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue