From 8c7be1fbb1d172ffc5cf99ec2b013f11f35dc421 Mon Sep 17 00:00:00 2001 From: Jean-François Milants Date: Tue, 11 Oct 2022 21:11:23 +0200 Subject: CheckboxList : fix formatting. --- src/displayapp/screens/CheckboxList.cpp | 7 +--- src/displayapp/screens/CheckboxList.h | 4 +- .../screens/settings/SettingWatchFace.cpp | 46 +++++++++++----------- 3 files changed, 28 insertions(+), 29 deletions(-) (limited to 'src') diff --git a/src/displayapp/screens/CheckboxList.cpp b/src/displayapp/screens/CheckboxList.cpp index 3d84166c..d97726dd 100644 --- a/src/displayapp/screens/CheckboxList.cpp +++ b/src/displayapp/screens/CheckboxList.cpp @@ -17,12 +17,9 @@ CheckboxList::CheckboxList(const uint8_t screenID, const char* optionsTitle, const char* optionsSymbol, uint32_t originalValue, - std::functionOnValueChanged, + std::function OnValueChanged, std::array 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 1bdb89d2..f9c3bae0 100644 --- a/src/displayapp/screens/CheckboxList.h +++ b/src/displayapp/screens/CheckboxList.h @@ -20,14 +20,14 @@ namespace Pinetime { const char* optionsTitle, const char* optionsSymbol, uint32_t originalValue, - std::functionOnValueChanged, + std::function OnValueChanged, std::array options); ~CheckboxList() override; void UpdateSelected(lv_obj_t* object, lv_event_t event); private: const uint8_t screenID; - std::functionOnValueChanged; + std::function OnValueChanged; std::array options; std::array cbOption; std::array pageIndicatorBasePoints; diff --git a/src/displayapp/screens/settings/SettingWatchFace.cpp b/src/displayapp/screens/settings/SettingWatchFace.cpp index ce1efaa2..6d47f3a5 100644 --- a/src/displayapp/screens/settings/SettingWatchFace.cpp +++ b/src/displayapp/screens/settings/SettingWatchFace.cpp @@ -34,30 +34,32 @@ bool SettingWatchFace::OnTouchEvent(Pinetime::Applications::TouchEvents event) { std::unique_ptr SettingWatchFace::CreateScreen1() { std::array watchfaces {"Digital face", "Analog face", "PineTimeStyle", "Terminal"}; - return std::make_unique(0, - 2, - app, - title, - symbol, - settingsController.GetClockFace(), - [&settings = settingsController](uint32_t clockFace) { - settings.SetClockFace(clockFace); - settings.SaveSettings(); - }, - watchfaces); + return std::make_unique( + 0, + 2, + app, + title, + symbol, + settingsController.GetClockFace(), + [&settings = settingsController](uint32_t clockFace) { + settings.SetClockFace(clockFace); + settings.SaveSettings(); + }, + watchfaces); } std::unique_ptr SettingWatchFace::CreateScreen2() { std::array watchfaces {"Infineat face", "Casio G7710", "", ""}; - return std::make_unique(1, - 2, - app, - title, - symbol, - settingsController.GetClockFace(), - [&settings = settingsController](uint32_t clockFace) { - settings.SetClockFace(clockFace); - settings.SaveSettings(); - }, - watchfaces); + return std::make_unique( + 1, + 2, + app, + title, + symbol, + settingsController.GetClockFace(), + [&settings = settingsController](uint32_t clockFace) { + settings.SetClockFace(clockFace); + settings.SaveSettings(); + }, + watchfaces); } -- cgit v1.2.3