Skip to content

Commit 8c7be1f

Browse files
committed
CheckboxList : fix formatting.
1 parent 4ec49bd commit 8c7be1f

File tree

3 files changed

+28
-29
lines changed

3 files changed

+28
-29
lines changed

src/displayapp/screens/CheckboxList.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,9 @@ CheckboxList::CheckboxList(const uint8_t screenID,
1717
const char* optionsTitle,
1818
const char* optionsSymbol,
1919
uint32_t originalValue,
20-
std::function<void(uint32_t)>OnValueChanged,
20+
std::function<void(uint32_t)> OnValueChanged,
2121
std::array<const char*, MaxItems> options)
22-
: Screen(app),
23-
screenID {screenID},
24-
OnValueChanged{std::move(OnValueChanged)},
25-
options {options}, value {originalValue} {
22+
: Screen(app), screenID {screenID}, OnValueChanged {std::move(OnValueChanged)}, options {options}, value {originalValue} {
2623
// Set the background to Black
2724
lv_obj_set_style_local_bg_color(lv_scr_act(), LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_BLACK);
2825

src/displayapp/screens/CheckboxList.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ namespace Pinetime {
2020
const char* optionsTitle,
2121
const char* optionsSymbol,
2222
uint32_t originalValue,
23-
std::function<void(uint32_t)>OnValueChanged,
23+
std::function<void(uint32_t)> OnValueChanged,
2424
std::array<const char*, MaxItems> options);
2525
~CheckboxList() override;
2626
void UpdateSelected(lv_obj_t* object, lv_event_t event);
2727

2828
private:
2929
const uint8_t screenID;
30-
std::function<void(uint32_t)>OnValueChanged;
30+
std::function<void(uint32_t)> OnValueChanged;
3131
std::array<const char*, MaxItems> options;
3232
std::array<lv_obj_t*, MaxItems> cbOption;
3333
std::array<lv_point_t, 2> pageIndicatorBasePoints;

src/displayapp/screens/settings/SettingWatchFace.cpp

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -34,30 +34,32 @@ bool SettingWatchFace::OnTouchEvent(Pinetime::Applications::TouchEvents event) {
3434

3535
std::unique_ptr<Screen> SettingWatchFace::CreateScreen1() {
3636
std::array<const char*, 4> watchfaces {"Digital face", "Analog face", "PineTimeStyle", "Terminal"};
37-
return std::make_unique<Screens::CheckboxList>(0,
38-
2,
39-
app,
40-
title,
41-
symbol,
42-
settingsController.GetClockFace(),
43-
[&settings = settingsController](uint32_t clockFace) {
44-
settings.SetClockFace(clockFace);
45-
settings.SaveSettings();
46-
},
47-
watchfaces);
37+
return std::make_unique<Screens::CheckboxList>(
38+
0,
39+
2,
40+
app,
41+
title,
42+
symbol,
43+
settingsController.GetClockFace(),
44+
[&settings = settingsController](uint32_t clockFace) {
45+
settings.SetClockFace(clockFace);
46+
settings.SaveSettings();
47+
},
48+
watchfaces);
4849
}
4950

5051
std::unique_ptr<Screen> SettingWatchFace::CreateScreen2() {
5152
std::array<const char*, 4> watchfaces {"Infineat face", "Casio G7710", "", ""};
52-
return std::make_unique<Screens::CheckboxList>(1,
53-
2,
54-
app,
55-
title,
56-
symbol,
57-
settingsController.GetClockFace(),
58-
[&settings = settingsController](uint32_t clockFace) {
59-
settings.SetClockFace(clockFace);
60-
settings.SaveSettings();
61-
},
62-
watchfaces);
53+
return std::make_unique<Screens::CheckboxList>(
54+
1,
55+
2,
56+
app,
57+
title,
58+
symbol,
59+
settingsController.GetClockFace(),
60+
[&settings = settingsController](uint32_t clockFace) {
61+
settings.SetClockFace(clockFace);
62+
settings.SaveSettings();
63+
},
64+
watchfaces);
6365
}

0 commit comments

Comments
 (0)