Author: Jean-François Milants <jf@codingfield.com>
CheckboxList : fix formatting.
src/displayapp/screens/CheckboxList.cpp | 7 - src/displayapp/screens/CheckboxList.h | 4 src/displayapp/screens/settings/SettingWatchFace.cpp | 46 +++++++------
diff --git a/src/displayapp/screens/CheckboxList.cpp b/src/displayapp/screens/CheckboxList.cpp index 3d84166cbe4b8190221691a6b5097e87fde82b75..d97726dd5959b26629d9b6c2f066251f29f933d9 100644 --- a/src/displayapp/screens/CheckboxList.cpp +++ b/src/displayapp/screens/CheckboxList.cpp @@ -17,12 +17,9 @@ DisplayApp* app, const char* optionsTitle, const char* optionsSymbol, uint32_t originalValue, - std::function<void(uint32_t)>OnValueChanged, + std::function<void(uint32_t)> OnValueChanged, std::array<const char*, MaxItems> options) - : Screen(app), - screenID {screenID}, - OnValueChanged{std::move(OnValueChanged)}, - options {options}, value {originalValue} { + : Screen(app), screenID {screenID}, OnValueChanged {std::move(OnValueChanged)}, options {options}, value {originalValue} { // Set the background to Black lv_obj_set_style_local_bg_color(lv_scr_act(), LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_BLACK); diff --git a/src/displayapp/screens/CheckboxList.h b/src/displayapp/screens/CheckboxList.h index 1bdb89d2c1f356ce0cb3d6cdb265d6ff8edcb77b..f9c3bae05fe0c33cf88936ed42f5884d47dcec42 100644 --- a/src/displayapp/screens/CheckboxList.h +++ b/src/displayapp/screens/CheckboxList.h @@ -20,14 +20,14 @@ DisplayApp* app, const char* optionsTitle, const char* optionsSymbol, uint32_t originalValue, - std::function<void(uint32_t)>OnValueChanged, + std::function<void(uint32_t)> OnValueChanged, std::array<const char*, MaxItems> options); ~CheckboxList() override; void UpdateSelected(lv_obj_t* object, lv_event_t event); private: const uint8_t screenID; - std::function<void(uint32_t)>OnValueChanged; + std::function<void(uint32_t)> OnValueChanged; std::array<const char*, MaxItems> options; std::array<lv_obj_t*, MaxItems> cbOption; std::array<lv_point_t, 2> pageIndicatorBasePoints; diff --git a/src/displayapp/screens/settings/SettingWatchFace.cpp b/src/displayapp/screens/settings/SettingWatchFace.cpp index ce1efaa2cc50ff3aae600307c8690c03370a02d0..6d47f3a5dc8e47f11c931e4de78ccc1b4198e72f 100644 --- a/src/displayapp/screens/settings/SettingWatchFace.cpp +++ b/src/displayapp/screens/settings/SettingWatchFace.cpp @@ -34,30 +34,32 @@ } std::unique_ptr<Screen> SettingWatchFace::CreateScreen1() { std::array<const char*, 4> watchfaces {"Digital face", "Analog face", "PineTimeStyle", "Terminal"}; - return std::make_unique<Screens::CheckboxList>(0, - 2, - app, - title, - symbol, - settingsController.GetClockFace(), - [&settings = settingsController](uint32_t clockFace) { - settings.SetClockFace(clockFace); - settings.SaveSettings(); - }, - watchfaces); + return std::make_unique<Screens::CheckboxList>( + 0, + 2, + app, + title, + symbol, + settingsController.GetClockFace(), + [&settings = settingsController](uint32_t clockFace) { + settings.SetClockFace(clockFace); + settings.SaveSettings(); + }, + watchfaces); } std::unique_ptr<Screen> SettingWatchFace::CreateScreen2() { std::array<const char*, 4> watchfaces {"Infineat face", "Casio G7710", "", ""}; - return std::make_unique<Screens::CheckboxList>(1, - 2, - app, - title, - symbol, - settingsController.GetClockFace(), - [&settings = settingsController](uint32_t clockFace) { - settings.SetClockFace(clockFace); - settings.SaveSettings(); - }, - watchfaces); + return std::make_unique<Screens::CheckboxList>( + 1, + 2, + app, + title, + symbol, + settingsController.GetClockFace(), + [&settings = settingsController](uint32_t clockFace) { + settings.SetClockFace(clockFace); + settings.SaveSettings(); + }, + watchfaces); }