diff --git a/lib/I18n/translations/english.yaml b/lib/I18n/translations/english.yaml index c30e04b0..492c76ac 100644 --- a/lib/I18n/translations/english.yaml +++ b/lib/I18n/translations/english.yaml @@ -112,7 +112,8 @@ STR_SHOW_FILE_EXTENSIONS: "Show File Extensions" STR_USE_CLOCK: "Use Clock" STR_USE_WEATHER: "Use Weather" STR_CLOCK_SETTINGS: "Clock Settings" -STR_CLOCK_SETTINGS_WARNING: "Uses more battery; clock may drift" +STR_CLOCK_SETTINGS_WARNING_BATTERY: "Uses more battery" +STR_CLOCK_SETTINGS_WARNING_DRIFT: "Clock may drift" STR_CLOCK: "Clock" STR_CLOCK_FORMAT: "Clock Format" STR_TIMEZONE: "Timezone" diff --git a/src/activities/settings/ClockSettingsActivity.cpp b/src/activities/settings/ClockSettingsActivity.cpp index 06026083..ae3e42f1 100644 --- a/src/activities/settings/ClockSettingsActivity.cpp +++ b/src/activities/settings/ClockSettingsActivity.cpp @@ -2,14 +2,18 @@ #include #include +#include #include +#include + #include "CrossPointSettings.h" #include "DetectTimezoneActivity.h" #include "SyncTimeActivity.h" #include "components/UITheme.h" #include "fontIds.h" + namespace { const StrId timeZoneNames[CrossPointSettings::TIMEZONE_COUNT] = { StrId::STR_TZ_UTC, StrId::STR_TZ_CET, StrId::STR_TZ_EET, StrId::STR_TZ_MSK, @@ -96,10 +100,19 @@ void ClockSettingsActivity::render(RenderLock&&) { GUI.drawHeader(renderer, Rect(contentRect.x, contentRect.y + metrics.topPadding, contentRect.width, metrics.headerHeight), tr(STR_CLOCK_SETTINGS)); + + const char* batteryWarning = tr(STR_CLOCK_SETTINGS_WARNING_BATTERY); + const char* driftWarning = tr(STR_CLOCK_SETTINGS_WARNING_DRIFT); + + std::string warning = driftWarning; + if (!gpio.deviceIsX3()) { + warning = std::string(batteryWarning) + "; " + driftWarning; + } + GUI.drawSubHeader(renderer, Rect(contentRect.x, contentRect.y + metrics.topPadding + metrics.headerHeight, contentRect.width, metrics.tabBarHeight), - tr(STR_CLOCK_SETTINGS_WARNING)); + warning.c_str()); const int contentTop = contentRect.y + metrics.topPadding + metrics.headerHeight + metrics.tabBarHeight + metrics.verticalSpacing;