From 9c5b1437ecd032c163f2caf3afeac32b90b7f7ae Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Thu, 13 Oct 2022 21:24:33 +0300 Subject: Optimize SettingTimeFormat --- src/displayapp/screens/settings/SettingTimeFormat.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/displayapp/screens/settings/SettingTimeFormat.h') diff --git a/src/displayapp/screens/settings/SettingTimeFormat.h b/src/displayapp/screens/settings/SettingTimeFormat.h index 01ca2c9b..dc0413ec 100644 --- a/src/displayapp/screens/settings/SettingTimeFormat.h +++ b/src/displayapp/screens/settings/SettingTimeFormat.h @@ -20,7 +20,14 @@ namespace Pinetime { void UpdateSelected(lv_obj_t* object, lv_event_t event); private: - static constexpr std::array options = {"12-hour", "24-hour"}; + struct Option { + Controllers::Settings::ClockType clockType; + const char* name; + }; + static constexpr std::array options = {{ + {Controllers::Settings::ClockType::H12, "12-hour"}, + {Controllers::Settings::ClockType::H24, "24-hour"}, + }}; Controllers::Settings& settingsController; lv_obj_t* cbOption[options.size()]; }; -- cgit v1.2.3-70-g09d2