diff options
author | ITCactus <n/a> | 2022-05-25 13:44:25 +0200 |
---|---|---|
committer | ITCactus <n/a> | 2022-06-30 15:15:32 +0200 |
commit | cfaafc1fe2e31926343c571bc22a9afa54287f47 (patch) | |
tree | df2f36033807610ee419f4ef0acebfbf7fc0298c /src/displayapp/screens/CheckboxList.cpp | |
parent | e7c0b2c5c250f9dc43175bb8d73b2961bfae6b93 (diff) |
fix for week number and days till the end of the year
+ formating (clang)
Diffstat (limited to 'src/displayapp/screens/CheckboxList.cpp')
-rw-r--r-- | src/displayapp/screens/CheckboxList.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/displayapp/screens/CheckboxList.cpp b/src/displayapp/screens/CheckboxList.cpp index 4da7826c..ee64167d 100644 --- a/src/displayapp/screens/CheckboxList.cpp +++ b/src/displayapp/screens/CheckboxList.cpp @@ -20,10 +20,13 @@ CheckboxList::CheckboxList(const uint8_t screenID, const char* optionsTitle, const char* optionsSymbol, void (Controllers::Settings::*SetOptionIndex)(uint8_t), - uint8_t (Controllers::Settings::*GetOptionIndex )() const, + uint8_t (Controllers::Settings::*GetOptionIndex)() const, std::array<const char*, MAXLISTITEMS> options) - : Screen(app), screenID {screenID}, settingsController {settingsController}, - SetOptionIndex {SetOptionIndex}, GetOptionIndex {GetOptionIndex}, + : Screen(app), + screenID {screenID}, + settingsController {settingsController}, + SetOptionIndex {SetOptionIndex}, + GetOptionIndex {GetOptionIndex}, options {options} { settingsController.SetWatchfacesMenu(screenID); @@ -87,7 +90,7 @@ CheckboxList::CheckboxList(const uint8_t screenID, lv_obj_set_event_cb(cbOption[i], event_handler); SetRadioButtonStyle(cbOption[i]); - if (static_cast<unsigned int>((settingsController.*GetOptionIndex)() - MAXLISTITEMS*screenID) == i) { + if (static_cast<unsigned int>((settingsController.*GetOptionIndex)() - MAXLISTITEMS * screenID) == i) { lv_checkbox_set_checked(cbOption[i], true); } } @@ -105,7 +108,7 @@ void CheckboxList::UpdateSelected(lv_obj_t* object, lv_event_t event) { if (strcmp(options[i], "")) { if (object == cbOption[i]) { lv_checkbox_set_checked(cbOption[i], true); - (settingsController.*SetOptionIndex)(MAXLISTITEMS*screenID + i); + (settingsController.*SetOptionIndex)(MAXLISTITEMS * screenID + i); } else { lv_checkbox_set_checked(cbOption[i], false); } |