summaryrefslogtreecommitdiff
path: root/src/displayapp
diff options
context:
space:
mode:
authorJean-François Milants <jf@codingfield.com>2022-09-27 21:04:40 +0200
committerJean-François Milants <jf@codingfield.com>2022-09-27 21:04:40 +0200
commit2400110900fbc69007f892295e734d083739bd0d (patch)
tree9fdd667ae3c8d3f949a4984f1cc9221571506e97 /src/displayapp
parent56f315b94acc45e2175e030fca31cf8b56e36b93 (diff)
CheckBoxList : remove unused constant MAXLISTITEMS (replaced by MaxItems).
Diffstat (limited to 'src/displayapp')
-rw-r--r--src/displayapp/screens/CheckboxList.cpp4
-rw-r--r--src/displayapp/screens/CheckboxList.h3
2 files changed, 3 insertions, 4 deletions
diff --git a/src/displayapp/screens/CheckboxList.cpp b/src/displayapp/screens/CheckboxList.cpp
index d351a852..7c7e8565 100644
--- a/src/displayapp/screens/CheckboxList.cpp
+++ b/src/displayapp/screens/CheckboxList.cpp
@@ -89,7 +89,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)() - MaxItems * screenID) == i) {
lv_checkbox_set_checked(cbOption[i], true);
}
}
@@ -107,7 +107,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)(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 68280edd..5bdd143e 100644
--- a/src/displayapp/screens/CheckboxList.h
+++ b/src/displayapp/screens/CheckboxList.h
@@ -3,12 +3,11 @@
#include <lvgl/lvgl.h>
#include <cstdint>
#include <memory>
+#include <array>
#include "displayapp/screens/Screen.h"
#include "displayapp/Apps.h"
#include "components/settings/Settings.h"
-#define MAXLISTITEMS 4
-
namespace Pinetime {
namespace Applications {
namespace Screens {