summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-François Milants <jf@codingfield.com>2022-10-11 21:02:05 +0200
committerJF <JF002@users.noreply.github.com>2022-10-11 21:16:33 +0200
commit4ec49bde8a8cce78b8b72c978b3e3b1d529cef48 (patch)
treea81867a1d7e0a8f09ad0594576eaf0e1598fcf1b
parentcf8b422899f198ae713b5a2a35e2ea737521b053 (diff)
CheckBoxList : rename newValue -> value.
-rw-r--r--src/displayapp/screens/CheckboxList.cpp7
-rw-r--r--src/displayapp/screens/CheckboxList.h2
2 files changed, 4 insertions, 5 deletions
diff --git a/src/displayapp/screens/CheckboxList.cpp b/src/displayapp/screens/CheckboxList.cpp
index 42f9f57d..3d84166c 100644
--- a/src/displayapp/screens/CheckboxList.cpp
+++ b/src/displayapp/screens/CheckboxList.cpp
@@ -22,8 +22,7 @@ CheckboxList::CheckboxList(const uint8_t screenID,
: Screen(app),
screenID {screenID},
OnValueChanged{std::move(OnValueChanged)},
- options {options},
- newValue{originalValue} {
+ 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);
@@ -92,7 +91,7 @@ CheckboxList::CheckboxList(const uint8_t screenID,
CheckboxList::~CheckboxList() {
lv_obj_clean(lv_scr_act());
- OnValueChanged(newValue);
+ OnValueChanged(value);
}
void CheckboxList::UpdateSelected(lv_obj_t* object, lv_event_t event) {
@@ -101,7 +100,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);
- newValue = MaxItems * screenID + i;
+ value = MaxItems * screenID + i;
} else {
lv_checkbox_set_checked(cbOption[i], false);
}
diff --git a/src/displayapp/screens/CheckboxList.h b/src/displayapp/screens/CheckboxList.h
index 4d27a62b..1bdb89d2 100644
--- a/src/displayapp/screens/CheckboxList.h
+++ b/src/displayapp/screens/CheckboxList.h
@@ -34,7 +34,7 @@ namespace Pinetime {
std::array<lv_point_t, 2> pageIndicatorPoints;
lv_obj_t* pageIndicatorBase;
lv_obj_t* pageIndicator;
- uint32_t newValue;
+ uint32_t value;
};
}
}