diff options
author | Jean-François Milants <jf@codingfield.com> | 2022-09-27 18:06:15 +0200 |
---|---|---|
committer | Jean-François Milants <jf@codingfield.com> | 2022-09-27 18:06:15 +0200 |
commit | 56f315b94acc45e2175e030fca31cf8b56e36b93 (patch) | |
tree | 84f937c314fd8e99807134d7c50094bcc5c76689 /src/displayapp/screens/CheckboxList.h | |
parent | 58bb0e77db34703b99522956de804a674ec81a23 (diff) |
A few minors changes following the code review : rename fs -> filesystem, use std::array instead of raw array,...
Diffstat (limited to 'src/displayapp/screens/CheckboxList.h')
-rw-r--r-- | src/displayapp/screens/CheckboxList.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/displayapp/screens/CheckboxList.h b/src/displayapp/screens/CheckboxList.h index 6660acde..68280edd 100644 --- a/src/displayapp/screens/CheckboxList.h +++ b/src/displayapp/screens/CheckboxList.h @@ -14,6 +14,8 @@ namespace Pinetime { namespace Screens { class CheckboxList : public Screen { public: + static constexpr size_t MaxItems = 4; + CheckboxList(const uint8_t screenID, const uint8_t numScreens, DisplayApp* app, @@ -22,7 +24,7 @@ namespace Pinetime { const char* optionsSymbol, void (Controllers::Settings::*SetOptionIndex)(uint8_t), uint8_t (Controllers::Settings::*GetOptionIndex)() const, - std::array<const char*, MAXLISTITEMS> options); + std::array<const char*, MaxItems> options); ~CheckboxList() override; @@ -35,12 +37,10 @@ namespace Pinetime { const char* optionsSymbol; void (Controllers::Settings::*SetOptionIndex)(uint8_t); uint8_t (Controllers::Settings::*GetOptionIndex)() const; - std::array<const char*, MAXLISTITEMS> options; - - lv_obj_t* cbOption[MAXLISTITEMS]; - - lv_point_t pageIndicatorBasePoints[2]; - lv_point_t pageIndicatorPoints[2]; + std::array<const char*, MaxItems> options; + std::array<lv_obj_t*, MaxItems> cbOption; + std::array<lv_point_t, 2> pageIndicatorBasePoints; + std::array<lv_point_t, 2> pageIndicatorPoints; lv_obj_t* pageIndicatorBase; lv_obj_t* pageIndicator; }; |