summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/ApplicationList.h
diff options
context:
space:
mode:
authorRiku Isokoski <riksu9000@gmail.com>2022-05-20 09:28:27 (GMT)
committerMichele Bini <michele.bini@gmail.com>2022-06-07 03:08:43 (GMT)
commit1a1de7af5e0ed29cb6906bb7155aa8b6752c57a0 (patch)
tree764b6772a8a5eabdef5c6b540c66eaf60d386748 /src/displayapp/screens/ApplicationList.h
parentd4224e1ce2f6825f07e23a0b1ec1963bfa03f37c (diff)
Replace magic values with appsPerScreen and entriesPerScreen
Diffstat (limited to 'src/displayapp/screens/ApplicationList.h')
-rw-r--r--src/displayapp/screens/ApplicationList.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/displayapp/screens/ApplicationList.h b/src/displayapp/screens/ApplicationList.h
index ac11a9b..dfd9119 100644
--- a/src/displayapp/screens/ApplicationList.h
+++ b/src/displayapp/screens/ApplicationList.h
@@ -30,7 +30,8 @@ namespace Pinetime {
Pinetime::Controllers::Battery& batteryController;
Controllers::DateTime& dateTimeController;
- static constexpr std::array<Tile::Applications, 13> applications {{
+ static constexpr int appsPerScreen = 6;
+ static constexpr std::array<Tile::Applications, appsPerScreen * 3> applications {{
{Symbols::stopWatch, Apps::StopWatch},
{Symbols::clock, Apps::Alarm},
{Symbols::hourGlass, Apps::Timer},
@@ -46,8 +47,13 @@ namespace Pinetime {
{Symbols::map, Apps::Navigation},
{Symbols::drum, Apps::Jumpscore},
+ {Symbols::none, Apps::None},
+ {Symbols::none, Apps::None},
+ {Symbols::none, Apps::None},
+ {Symbols::none, Apps::None},
+ {Symbols::none, Apps::None},
}};
- static constexpr int nScreens = (applications.size() + 5) / 6;
+ static constexpr int nScreens = (applications.size() + appsPerScreen - 1) / appsPerScreen;
ScreenList<nScreens> screens;
};
}