diff options
| author | Riku Isokoski <riksu9000@gmail.com> | 2022-10-13 21:24:33 +0300 |
|---|---|---|
| committer | JF <JF002@users.noreply.github.com> | 2022-12-18 16:39:34 +0100 |
| commit | 9c5b1437ecd032c163f2caf3afeac32b90b7f7ae (patch) | |
| tree | 4c79d1c40052f7979fd0505149a35cb11788e382 /src/displayapp/screens/settings/SettingTimeFormat.h | |
| parent | 23a68ba45ad17a8ab921b2553c22f720d3546e68 (diff) | |
Optimize SettingTimeFormat
Diffstat (limited to 'src/displayapp/screens/settings/SettingTimeFormat.h')
| -rw-r--r-- | src/displayapp/screens/settings/SettingTimeFormat.h | 9 |
1 files changed, 8 insertions, 1 deletions
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<const char*, 2> options = {"12-hour", "24-hour"}; + struct Option { + Controllers::Settings::ClockType clockType; + const char* name; + }; + static constexpr std::array<Option, 2> options = {{ + {Controllers::Settings::ClockType::H12, "12-hour"}, + {Controllers::Settings::ClockType::H24, "24-hour"}, + }}; Controllers::Settings& settingsController; lv_obj_t* cbOption[options.size()]; }; |
