diff options
| author | Riku Isokoski <riksu9000@gmail.com> | 2022-05-20 09:28:27 (GMT) |
|---|---|---|
| committer | Michele Bini <michele.bini@gmail.com> | 2022-06-03 10:32:33 (GMT) |
| commit | 99c259d82e1d223a9be0baa1f78522f8a123997c (patch) | |
| tree | 4791b4b6f8d08f3641eb289b3bf2254082ead3ad /src/displayapp/screens/ApplicationList.h | |
| parent | 842357c0b0c42c2c1310c64a7baec41bd2cff58d (diff) | |
Replace magic values with appsPerScreen and entriesPerScreen
Diffstat (limited to 'src/displayapp/screens/ApplicationList.h')
| -rw-r--r-- | src/displayapp/screens/ApplicationList.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/displayapp/screens/ApplicationList.h b/src/displayapp/screens/ApplicationList.h index 50e7fcd..3ff71b8 100644 --- a/src/displayapp/screens/ApplicationList.h +++ b/src/displayapp/screens/ApplicationList.h @@ -30,10 +30,11 @@ 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 * 2> applications {{ + {Symbols::stopWatch, Apps::StopWatch}, {Symbols::music, Apps::Music}, {Symbols::shoe, Apps::Steps}, - {Symbols::stopWatch, Apps::StopWatch}, {Symbols::heartBeat, Apps::HeartRate}, {Symbols::hourGlass, Apps::Timer}, {Symbols::clock, Apps::Alarm}, @@ -44,10 +45,8 @@ namespace Pinetime { {Symbols::paintbrush, Apps::Paint}, {Symbols::paddle, Apps::Paddle}, {"2", Apps::Twos}, - - {Symbols::chartLine, Apps::Motion}, }}; - static constexpr int nScreens = (applications.size() + 5) / 6; + static constexpr int nScreens = (applications.size() + appsPerScreen - 1) / appsPerScreen; ScreenList<nScreens> screens; }; } |
