InfiniTime.git

commit 32f20fa994fec9e21d2af4d7bd287b94316b3970

Author: JF <jf@codingfield.com>

Merge branch 'application-list' of JF/PineTime into develop

 src/CMakeLists.txt | 6 
 src/DisplayApp/Apps.h | 7 +
 src/DisplayApp/DisplayApp.cpp | 12 -
 src/DisplayApp/DisplayApp.h | 2 
 src/DisplayApp/Fonts/Readme.md | 2 
 src/DisplayApp/Fonts/jetbrains_mono_bold_20.c | 78 ++++++++--
 src/DisplayApp/Screens/ApplicationList.cpp | 80 ++++++++++++
 src/DisplayApp/Screens/ApplicationList.h | 32 ++++
 src/DisplayApp/Screens/Label.cpp | 17 --
 src/DisplayApp/Screens/Label.h | 13 -
 src/DisplayApp/Screens/ScreenList.cpp | 139 ---------------------
 src/DisplayApp/Screens/ScreenList.h | 70 +++++++---
 src/DisplayApp/Screens/Symbols.h | 4 
 src/DisplayApp/Screens/SystemInfo.cpp | 114 +++++++++++++++++
 src/DisplayApp/Screens/SystemInfo.h | 47 +++++++
 src/DisplayApp/Screens/Tile.cpp | 65 +-------
 src/DisplayApp/Screens/Tile.h | 41 +----


diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 2d6d6e8e5bdba88577c22ec6704c6d310e2b7e65..b1c45ffa6db7f318c2f2a33586d706860381572d 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -333,10 +333,11 @@   DisplayApp/Screens/Modal.cpp
   DisplayApp/Screens/BatteryIcon.cpp
   DisplayApp/Screens/BleIcon.cpp
   DisplayApp/Screens/Brightness.cpp
-  DisplayApp/Screens/ScreenList.cpp
+  DisplayApp/Screens/SystemInfo.cpp
   DisplayApp/Screens/Label.cpp
   DisplayApp/Screens/FirmwareUpdate.cpp
   DisplayApp/Screens/Music.cpp
+  DisplayApp/Screens/ApplicationList.cpp
   main.cpp
   drivers/St7789.cpp
   drivers/SpiNorFlash.cpp
@@ -412,9 +413,12 @@   DisplayApp/Screens/Modal.h
   DisplayApp/Screens/BatteryIcon.h
   DisplayApp/Screens/BleIcon.cpp
   DisplayApp/Screens/Brightness.h
+  DisplayApp/Screens/SystemInfo.h
   DisplayApp/Screens/ScreenList.h
   DisplayApp/Screens/Label.h
   DisplayApp/Screens/FirmwareUpdate.h
+  DisplayApp/Screens/ApplicationList.h
+  DisplayApp/Apps.h
   drivers/St7789.h
   drivers/SpiNorFlash.h
   drivers/SpiMaster.h




diff --git a/src/DisplayApp/Apps.h b/src/DisplayApp/Apps.h
new file mode 100644
index 0000000000000000000000000000000000000000..2ee7429985395693187551bc310587e3a7140910
--- /dev/null
+++ b/src/DisplayApp/Apps.h
@@ -0,0 +1,7 @@
+#pragma once
+
+namespace Pinetime {
+  namespace Applications {
+    enum class Apps {None, Launcher, Clock, SysInfo, Meter, Gauge, Brightness, Music};
+  }
+}
\ No newline at end of file




diff --git a/src/DisplayApp/DisplayApp.cpp b/src/DisplayApp/DisplayApp.cpp
index 46a9638565f065f1b994772d2455f8e055f623b8..1a530467dea75e3fe25d85709cb24b1f86e3c402 100644
--- a/src/DisplayApp/DisplayApp.cpp
+++ b/src/DisplayApp/DisplayApp.cpp
@@ -2,22 +2,20 @@ #include "DisplayApp.h"
 #include <FreeRTOS.h>
 #include <task.h>
 #include <libraries/log/nrf_log.h>
-#include <boards.h>
 #include <nrf_font.h>
 #include <queue.h>
 #include <Components/DateTime/DateTimeController.h>
 #include <drivers/Cst816s.h>
 #include <string>
-#include <lvgl/lvgl.h>
 #include <DisplayApp/Screens/Tile.h>
-#include <DisplayApp/Screens/Message.h>
 #include <DisplayApp/Screens/Meter.h>
 #include <DisplayApp/Screens/Gauge.h>
 #include <DisplayApp/Screens/Brightness.h>
-#include <DisplayApp/Screens/ScreenList.h>
+#include <DisplayApp/Screens/SystemInfo.h>
 #include <DisplayApp/Screens/Music.h>
 #include <Components/Ble/NotificationManager.h>
 #include <DisplayApp/Screens/FirmwareUpdate.h>
+#include <DisplayApp/Screens/ApplicationList.h>
 #include "../SystemTask/SystemTask.h"
 
 using namespace Pinetime::Applications;
@@ -180,13 +178,13 @@     lvgl.SetFullRefresh(Components::LittleVgl::FullRefreshDirections::Up);
     onClockApp = false;
     switch(nextApp) {
       case Apps::None:
-      case Apps::Launcher: currentScreen.reset(new Screens::Tile(this)); break;
+      case Apps::Launcher: currentScreen.reset(new Screens::ApplicationList(this)); break;
       case Apps::Clock:
         currentScreen.reset(new Screens::Clock(this, dateTimeController, batteryController, bleController));
         onClockApp = true;
         break;
 //      case Apps::Test: currentScreen.reset(new Screens::Message(this)); break;
-      case Apps::SysInfo: currentScreen.reset(new Screens::ScreenList(this, dateTimeController, batteryController, brightnessController, bleController, watchdog)); break;
+      case Apps::SysInfo: currentScreen.reset(new Screens::SystemInfo(this, dateTimeController, batteryController, brightnessController, bleController, watchdog)); break;
       case Apps::Meter: currentScreen.reset(new Screens::Meter(this)); break;
       case Apps::Gauge: currentScreen.reset(new Screens::Gauge(this)); break;
       case Apps::Brightness : currentScreen.reset(new Screens::Brightness(this, brightnessController)); break;
@@ -238,7 +236,7 @@   }
   return TouchEvents::None;
 }
 
-void DisplayApp::StartApp(DisplayApp::Apps app) {
+void DisplayApp::StartApp(Apps app) {
   nextApp = app;
 }
 




diff --git a/src/DisplayApp/DisplayApp.h b/src/DisplayApp/DisplayApp.h
index 23f04937b635d1e47d8feb3e3a729a8c8824cbfa..6bf020bbb94e89ee82f6aac25502f6433aa88883 100644
--- a/src/DisplayApp/DisplayApp.h
+++ b/src/DisplayApp/DisplayApp.h
@@ -18,6 +18,7 @@ #include 
 #include <DisplayApp/Screens/Modal.h>
 #include <Components/Ble/NotificationManager.h>
 #include "TouchEvents.h"
+#include "Apps.h"
 
 
 namespace Pinetime {
@@ -42,7 +43,6 @@                    Pinetime::Controllers::NotificationManager& notificationManager);
         void Start();
         void PushMessage(Messages msg);
 
-        enum class Apps {None, Launcher, Clock, SysInfo, Meter, Gauge, Brightness, Music};
         void StartApp(Apps app);
 
         void SetFullRefresh(FullRefreshDirections direction);




diff --git a/src/DisplayApp/Fonts/Readme.md b/src/DisplayApp/Fonts/Readme.md
index ddccc820191e67ce0982aa5413ad68795c138793..584ed030fc71e52dcb63fef7956292ed06cb8b10 100644
--- a/src/DisplayApp/Fonts/Readme.md
+++ b/src/DisplayApp/Fonts/Readme.md
@@ -10,7 +10,7 @@  * Size : 20
  * Bpp : 1 bit-per-pixel
  * Do not enable font compression and horizontal subpixel hinting
  * Load the file `JetBrainsMono-Bold.woff` and specify the following range : `0x20-0x7f`
- * Add a 2nd font, load the file `FontAwesome5-Solid+Brands+Regular.woff` and specify the following range : `0xf293, 0xf294, 0xf244, 0xf240, 0xf242, 0xf243, 0xf241, 0xf54b, 0xf21e, 0xf1e6, 0xf54b, 0xf017, 0xf129, 0xf03a, 0xf185`
+ * Add a 2nd font, load the file `FontAwesome5-Solid+Brands+Regular.woff` and specify the following range : `0xf293, 0xf294, 0xf244, 0xf240, 0xf242, 0xf243, 0xf241, 0xf54b, 0xf21e, 0xf1e6, 0xf54b, 0xf017, 0xf129, 0xf03a, 0xf185, 0xf560, 0xf001, 0xf3fd, 0xf069`
  * Click on Convert, and download the file `jetbrains_mono_bold_20.c` and copy it in `src/DisplayApp/Fonts`
   
 Add new symbols:




diff --git a/src/DisplayApp/Fonts/jetbrains_mono_bold_20.c b/src/DisplayApp/Fonts/jetbrains_mono_bold_20.c
index 96e13d63eea0281bb28d3694d42db2bd6a3277e9..e411cf79344bb7647c7e065404796626f56aa343 100644
--- a/src/DisplayApp/Fonts/jetbrains_mono_bold_20.c
+++ b/src/DisplayApp/Fonts/jetbrains_mono_bold_20.c
@@ -433,6 +433,15 @@
     /* U+7E "~" */
     0x78, 0xff, 0x3c, 0xff, 0x1e,
 
+    /* U+F001 "" */
+    0x0, 0x0, 0x70, 0x0, 0x7f, 0x0, 0x3f, 0xf0,
+    0x1f, 0xff, 0x7, 0xff, 0xf0, 0x7f, 0xff, 0x7,
+    0xfc, 0x70, 0x7e, 0x7, 0x7, 0x0, 0x70, 0x70,
+    0x7, 0x7, 0x0, 0x70, 0x70, 0x7, 0x7, 0x0,
+    0x70, 0x70, 0x7f, 0x7, 0xf, 0xf7, 0xf0, 0xff,
+    0xff, 0x7, 0xef, 0xf0, 0x0, 0xff, 0x0, 0x3,
+    0xc0, 0x0,
+
     /* U+F017 "" */
     0x3, 0xf8, 0x1, 0xff, 0xc0, 0x7f, 0xfc, 0x1f,
     0xff, 0xc7, 0xf1, 0xfc, 0xfe, 0x3f, 0x9f, 0xc7,
@@ -448,6 +457,14 @@     0x0, 0xf, 0x0, 0x0, 0xf3, 0xff, 0xff, 0x3f,
     0xff, 0xf0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
     0xf, 0x0, 0x0, 0xf3, 0xff, 0xff, 0x3f, 0xff,
     0xf0, 0x0, 0x0,
+
+    /* U+F069 "" */
+    0x0, 0xe0, 0x0, 0x1c, 0x0, 0x3, 0x80, 0x0,
+    0x70, 0x6, 0xe, 0xc, 0xf1, 0xc7, 0x9f, 0xbb,
+    0xf1, 0xff, 0xfc, 0xf, 0xfe, 0x0, 0x7f, 0x0,
+    0xf, 0xe0, 0x7, 0xff, 0x3, 0xff, 0xf8, 0xfd,
+    0xdf, 0x9e, 0x38, 0xf3, 0x7, 0x6, 0x0, 0xe0,
+    0x0, 0x1c, 0x0, 0x3, 0x80, 0x0, 0x70, 0x0,
 
     /* U+F129 "" */
     0x3c, 0x7e, 0x7e, 0x7e, 0x3c, 0x0, 0x0, 0xfc,
@@ -526,6 +543,15 @@     0xb9, 0x9b, 0xb6, 0x3f, 0x83, 0xe0, 0x38, 0x7,
     0x81, 0xf8, 0x6d, 0x99, 0x9a, 0x36, 0x7, 0x80,
     0xe0, 0x18, 0x2, 0x0, 0x0,
 
+    /* U+F3FD "" */
+    0x0, 0xfe, 0x0, 0x7, 0xff, 0x0, 0x3f, 0xbf,
+    0x80, 0xfe, 0x2f, 0x83, 0xfe, 0xcf, 0x8f, 0x3f,
+    0x27, 0x9e, 0x7e, 0x4f, 0x3f, 0xfc, 0xfe, 0xff,
+    0xf3, 0xff, 0xff, 0xe7, 0xff, 0xff, 0xcf, 0xff,
+    0xfe, 0x3f, 0xfe, 0x78, 0x3c, 0xff, 0xf0, 0x7f,
+    0xdf, 0xe0, 0xff, 0x3f, 0xff, 0xfe, 0x3f, 0xff,
+    0xf8,
+
     /* U+F54B "" */
     0x0, 0xf, 0xf8, 0x1, 0xdf, 0xff, 0x1, 0xef,
     0xff, 0xc0, 0xf7, 0xff, 0xf0, 0x7b, 0xff, 0xf8,
@@ -534,7 +560,16 @@     0xfc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
     0x0, 0x0, 0x0, 0x7, 0xf8, 0x0, 0xf, 0xfe,
     0x3, 0xbf, 0xff, 0x83, 0xdf, 0xff, 0xc1, 0xef,
     0xff, 0xe0, 0xf7, 0xff, 0xe0, 0x3b, 0xff, 0xe0,
-    0x0, 0x7f, 0xc0, 0x0
+    0x0, 0x7f, 0xc0, 0x0,
+
+    /* U+F560 "" */
+    0x0, 0x0, 0x0, 0x0, 0x60, 0x0, 0xf, 0x0,
+    0x1, 0xf0, 0x8, 0x3e, 0x1, 0xc7, 0xc4, 0x1e,
+    0xf8, 0xe1, 0xff, 0x1f, 0xf, 0xe3, 0xf0, 0x7c,
+    0x7e, 0x23, 0x8f, 0xc7, 0x11, 0xf8, 0xf8, 0x3f,
+    0xf, 0xc7, 0xe0, 0x7e, 0xfc, 0x3, 0xff, 0x80,
+    0x1f, 0xf0, 0x0, 0xfe, 0x0, 0x7, 0xc0, 0x0,
+    0x38, 0x0, 0x1, 0x0, 0x0
 };
 
 
@@ -639,20 +674,24 @@     {.bitmap_index = 1402, .adv_w = 192, .box_w = 9, .box_h = 18, .ofs_x = 2, .ofs_y = -2},
     {.bitmap_index = 1423, .adv_w = 192, .box_w = 3, .box_h = 18, .ofs_x = 5, .ofs_y = -2},
     {.bitmap_index = 1430, .adv_w = 192, .box_w = 10, .box_h = 18, .ofs_x = 1, .ofs_y = -2},
     {.bitmap_index = 1453, .adv_w = 192, .box_w = 10, .box_h = 4, .ofs_x = 1, .ofs_y = 5},
-    {.bitmap_index = 1458, .adv_w = 320, .box_w = 19, .box_h = 20, .ofs_x = 0, .ofs_y = -3},
-    {.bitmap_index = 1506, .adv_w = 320, .box_w = 20, .box_h = 17, .ofs_x = 0, .ofs_y = -1},
-    {.bitmap_index = 1549, .adv_w = 120, .box_w = 8, .box_h = 19, .ofs_x = 0, .ofs_y = -2},
-    {.bitmap_index = 1568, .adv_w = 320, .box_w = 20, .box_h = 20, .ofs_x = 0, .ofs_y = -3},
-    {.bitmap_index = 1618, .adv_w = 240, .box_w = 15, .box_h = 19, .ofs_x = 0, .ofs_y = -2},
-    {.bitmap_index = 1654, .adv_w = 320, .box_w = 20, .box_h = 17, .ofs_x = 0, .ofs_y = -1},
-    {.bitmap_index = 1697, .adv_w = 400, .box_w = 25, .box_h = 12, .ofs_x = 0, .ofs_y = 1},
-    {.bitmap_index = 1735, .adv_w = 400, .box_w = 25, .box_h = 12, .ofs_x = 0, .ofs_y = 1},
-    {.bitmap_index = 1773, .adv_w = 400, .box_w = 25, .box_h = 12, .ofs_x = 0, .ofs_y = 1},
-    {.bitmap_index = 1811, .adv_w = 400, .box_w = 25, .box_h = 12, .ofs_x = 0, .ofs_y = 1},
-    {.bitmap_index = 1849, .adv_w = 400, .box_w = 25, .box_h = 12, .ofs_x = 0, .ofs_y = 1},
-    {.bitmap_index = 1887, .adv_w = 280, .box_w = 15, .box_h = 20, .ofs_x = 1, .ofs_y = -3},
-    {.bitmap_index = 1925, .adv_w = 200, .box_w = 11, .box_h = 21, .ofs_x = 0, .ofs_y = -3},
-    {.bitmap_index = 1954, .adv_w = 400, .box_w = 25, .box_h = 19, .ofs_x = 0, .ofs_y = -2}
+    {.bitmap_index = 1458, .adv_w = 320, .box_w = 20, .box_h = 20, .ofs_x = 0, .ofs_y = -3},
+    {.bitmap_index = 1508, .adv_w = 320, .box_w = 19, .box_h = 20, .ofs_x = 0, .ofs_y = -3},
+    {.bitmap_index = 1556, .adv_w = 320, .box_w = 20, .box_h = 17, .ofs_x = 0, .ofs_y = -1},
+    {.bitmap_index = 1599, .adv_w = 320, .box_w = 19, .box_h = 20, .ofs_x = 0, .ofs_y = -3},
+    {.bitmap_index = 1647, .adv_w = 120, .box_w = 8, .box_h = 19, .ofs_x = 0, .ofs_y = -2},
+    {.bitmap_index = 1666, .adv_w = 320, .box_w = 20, .box_h = 20, .ofs_x = 0, .ofs_y = -3},
+    {.bitmap_index = 1716, .adv_w = 240, .box_w = 15, .box_h = 19, .ofs_x = 0, .ofs_y = -2},
+    {.bitmap_index = 1752, .adv_w = 320, .box_w = 20, .box_h = 17, .ofs_x = 0, .ofs_y = -1},
+    {.bitmap_index = 1795, .adv_w = 400, .box_w = 25, .box_h = 12, .ofs_x = 0, .ofs_y = 1},
+    {.bitmap_index = 1833, .adv_w = 400, .box_w = 25, .box_h = 12, .ofs_x = 0, .ofs_y = 1},
+    {.bitmap_index = 1871, .adv_w = 400, .box_w = 25, .box_h = 12, .ofs_x = 0, .ofs_y = 1},
+    {.bitmap_index = 1909, .adv_w = 400, .box_w = 25, .box_h = 12, .ofs_x = 0, .ofs_y = 1},
+    {.bitmap_index = 1947, .adv_w = 400, .box_w = 25, .box_h = 12, .ofs_x = 0, .ofs_y = 1},
+    {.bitmap_index = 1985, .adv_w = 280, .box_w = 15, .box_h = 20, .ofs_x = 1, .ofs_y = -3},
+    {.bitmap_index = 2023, .adv_w = 200, .box_w = 11, .box_h = 21, .ofs_x = 0, .ofs_y = -3},
+    {.bitmap_index = 2052, .adv_w = 360, .box_w = 23, .box_h = 17, .ofs_x = 0, .ofs_y = -1},
+    {.bitmap_index = 2101, .adv_w = 400, .box_w = 25, .box_h = 19, .ofs_x = 0, .ofs_y = -2},
+    {.bitmap_index = 2161, .adv_w = 320, .box_w = 20, .box_h = 21, .ofs_x = 0, .ofs_y = -3}
 };
 
 /*---------------------
@@ -660,8 +699,9 @@  *  CHARACTER MAPPING
  *--------------------*/
 
 static const uint16_t unicode_list_1[] = {
-    0x0, 0x23, 0x112, 0x16e, 0x1cf, 0x207, 0x229, 0x22a,
-    0x22b, 0x22c, 0x22d, 0x27c, 0x27d, 0x534
+    0x0, 0x16, 0x39, 0x68, 0x128, 0x184, 0x1e5, 0x21d,
+    0x23f, 0x240, 0x241, 0x242, 0x243, 0x292, 0x293, 0x3fc,
+    0x54a, 0x55f
 };
 
 /*Collect the unicode lists and glyph_id offsets*/
@@ -672,8 +712,8 @@         .range_start = 32, .range_length = 95, .glyph_id_start = 1,
         .unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY
     },
     {
-        .range_start = 61463, .range_length = 1333, .glyph_id_start = 96,
-        .unicode_list = unicode_list_1, .glyph_id_ofs_list = NULL, .list_length = 14, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
+        .range_start = 61441, .range_length = 1376, .glyph_id_start = 96,
+        .unicode_list = unicode_list_1, .glyph_id_ofs_list = NULL, .list_length = 18, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
     }
 };
 




diff --git a/src/DisplayApp/Screens/ApplicationList.cpp b/src/DisplayApp/Screens/ApplicationList.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..c7c096f4152cb12d56a5b6e2efe4c0325059f771
--- /dev/null
+++ b/src/DisplayApp/Screens/ApplicationList.cpp
@@ -0,0 +1,80 @@
+#include <libs/lvgl/lvgl.h>
+#include <DisplayApp/DisplayApp.h>
+#include <functional>
+#include "ApplicationList.h"
+#include "Tile.h"
+#include "Symbols.h"
+
+using namespace Pinetime::Applications::Screens;
+
+ApplicationList::ApplicationList(Pinetime::Applications::DisplayApp *app) :
+        Screen(app),
+        screens{app, {
+                [this]() -> std::unique_ptr<Screen> { return CreateScreen1(); },
+                //[this]() -> std::unique_ptr<Screen> { return CreateScreen2(); },
+                //[this]() -> std::unique_ptr<Screen> { return CreateScreen3(); }
+          }
+        } {}
+
+
+ApplicationList::~ApplicationList() {
+  lv_obj_clean(lv_scr_act());
+}
+
+bool ApplicationList::Refresh() {
+  if(running)
+    running = screens.Refresh();
+  return running;
+}
+
+bool ApplicationList::OnButtonPushed() {
+  running = false;
+  app->StartApp(Apps::Clock);
+  return true;
+}
+
+bool ApplicationList::OnTouchEvent(Pinetime::Applications::TouchEvents event) {
+  return screens.OnTouchEvent(event);
+}
+
+std::unique_ptr<Screen> ApplicationList::CreateScreen1() {
+  std::array<Screens::Tile::Applications, 6> applications {
+          {{Symbols::asterisk, Apps::Meter},
+           {Symbols::tachometer, Apps::Gauge},
+           {Symbols::clock, Apps::Clock},
+           {Symbols::music, Apps::Music},
+           {Symbols::list, Apps::SysInfo},
+           {Symbols::sun, Apps::Brightness}
+          }
+  };
+
+  return std::unique_ptr<Screen>(new Screens::Tile(app, applications));
+}
+
+std::unique_ptr<Screen> ApplicationList::CreateScreen2() {
+  std::array<Screens::Tile::Applications, 6> applications {
+          {{"0", Apps::Meter},
+           {"1", Apps::Gauge},
+           {"2", Apps::Clock},
+           {"3", Apps::Music},
+           {"4", Apps::SysInfo},
+           {"5", Apps::Brightness}
+          }
+  };
+
+  return std::unique_ptr<Screen>(new Screens::Tile(app, applications));
+}
+
+std::unique_ptr<Screen> ApplicationList::CreateScreen3() {
+  std::array<Screens::Tile::Applications, 6> applications {
+          {{"A", Apps::Meter},
+           {"B", Apps::Gauge},
+           {"C", Apps::Clock},
+           {"D", Apps::Music},
+           {"E", Apps::SysInfo},
+           {"F", Apps::Brightness}
+          }
+  };
+
+  return std::unique_ptr<Screen>(new Screens::Tile(app, applications));
+}




diff --git a/src/DisplayApp/Screens/ApplicationList.h b/src/DisplayApp/Screens/ApplicationList.h
new file mode 100644
index 0000000000000000000000000000000000000000..372cbb7aba384352a31340fa9acf18639f9e649e
--- /dev/null
+++ b/src/DisplayApp/Screens/ApplicationList.h
@@ -0,0 +1,32 @@
+#pragma once
+
+#include <vector>
+#include <Components/Ble/NimbleController.h>
+#include "Screen.h"
+#include "Label.h"
+#include "ScreenList.h"
+#include "Gauge.h"
+#include "Meter.h"
+#include <functional>
+
+namespace Pinetime {
+  namespace Applications {
+    namespace Screens {
+      class ApplicationList : public Screen {
+        public:
+          explicit ApplicationList(DisplayApp* app);
+          ~ApplicationList() override;
+          bool Refresh() override;
+          bool OnButtonPushed() override;
+          bool OnTouchEvent(TouchEvents event) override;
+        private:
+          bool running = true;
+
+          ScreenList<1> screens;
+          std::unique_ptr<Screen> CreateScreen1();
+          std::unique_ptr<Screen> CreateScreen2();
+          std::unique_ptr<Screen> CreateScreen3();
+      };
+    }
+  }
+}
\ No newline at end of file




diff --git a/src/DisplayApp/Screens/Label.cpp b/src/DisplayApp/Screens/Label.cpp
index ba35279d737d2c6fc9b9f43bfb4c0aae8e074684..780ee88eb25b832d61ad0368e2b1cb5dec5e2e59 100644
--- a/src/DisplayApp/Screens/Label.cpp
+++ b/src/DisplayApp/Screens/Label.cpp
@@ -3,26 +3,13 @@ #include "Label.h"
 
 using namespace Pinetime::Applications::Screens;
 
-
-Label::Label(const char* text) : text{text} {
-
-}
-
-Label::~Label() {
-
-}
-
-void Label::Refresh() {
-
-}
-
-void Label::Show() {
+Label::Label(Pinetime::Applications::DisplayApp *app, const char *text)  : Screen(app), text{text} {
   label = lv_label_create(lv_scr_act(), NULL);
   lv_label_set_align(label, LV_LABEL_ALIGN_LEFT);
   lv_obj_set_size(label, 240, 240);
   lv_label_set_text(label, text);
 }
 
-void Label::Hide() {
+Label::~Label() {
   lv_obj_clean(lv_scr_act());
 }




diff --git a/src/DisplayApp/Screens/Label.h b/src/DisplayApp/Screens/Label.h
index b73540f4b626cf1b5bca8cbca922f6efdb2516f5..3e7b37972846ce336c2c081120afcdde6d7ef688 100644
--- a/src/DisplayApp/Screens/Label.h
+++ b/src/DisplayApp/Screens/Label.h
@@ -2,19 +2,18 @@ #pragma once
 
 #include <vector>
 #include "Screen.h"
+#include <lvgl/lvgl.h>
 
 namespace Pinetime {
   namespace Applications {
     namespace Screens {
-      class Label {
+
+      class Label : public Screen {
         public:
-          Label() = default;
-          explicit Label(const char* text);
-          ~Label();
-          void Refresh();
+          Label(DisplayApp* app, const char* text);
+          ~Label() override;
+          bool Refresh() override {return false;}
 
-          void Hide();
-          void Show();
         private:
           lv_obj_t * label = nullptr;
           const char* text = nullptr;




diff --git a/src/DisplayApp/Screens/ScreenList.cpp b/src/DisplayApp/Screens/ScreenList.cpp
deleted file mode 100644
index 754d5f7e0bd3953b55ea5e977e25addb0823b961..0000000000000000000000000000000000000000
--- a/src/DisplayApp/Screens/ScreenList.cpp
+++ /dev/null
@@ -1,139 +0,0 @@
-#include <libs/lvgl/lvgl.h>
-#include <DisplayApp/DisplayApp.h>
-#include "ScreenList.h"
-#include "../../Version.h"
-
-using namespace Pinetime::Applications::Screens;
-
-// TODO this class must be improved to receive the list of "sub screens" via pointer or
-// move operation.
-// It should accept many type of "sub screen" (it only supports Label for now).
-// The number of sub screen it supports must be dynamic.
-ScreenList::ScreenList(Pinetime::Applications::DisplayApp *app,
-        Pinetime::Controllers::DateTime &dateTimeController,
-        Pinetime::Controllers::Battery& batteryController,
-        Pinetime::Controllers::BrightnessController& brightnessController,
-                       Pinetime::Controllers::Ble& bleController,
-        Pinetime::Drivers::WatchdogView& watchdog) :
-        Screen(app),
-        dateTimeController{dateTimeController}, batteryController{batteryController},
-        brightnessController{brightnessController}, bleController{bleController}, watchdog{watchdog} {
-  screens.reserve(3);
-
-  // TODO all of this is far too heavy (string processing). This should be improved.
-  // TODO the info (battery, time,...) should be updated in the Refresh method.
-
-
-  auto batteryPercent = static_cast<int16_t>(batteryController.PercentRemaining());
-  if(batteryPercent > 100) batteryPercent = 100;
-  else if(batteryPercent < 0) batteryPercent = 0;
-
-  uint8_t brightness = 0;
-  switch(brightnessController.Level()) {
-    case Controllers::BrightnessController::Levels::Low: brightness = 1; break;
-    case Controllers::BrightnessController::Levels::Medium: brightness = 2; break;
-    case Controllers::BrightnessController::Levels::High: brightness = 3; break;
-  }
-  auto resetReason = [&watchdog]() {
-    switch (watchdog.ResetReason()) {
-      case Drivers::Watchdog::ResetReasons::Watchdog: return "wtdg";
-      case Drivers::Watchdog::ResetReasons::HardReset: return "hardr";
-      case Drivers::Watchdog::ResetReasons::NFC: return "nfc";
-      case Drivers::Watchdog::ResetReasons::SoftReset: return "softr";
-      case Drivers::Watchdog::ResetReasons::CpuLockup: return "cpulock";
-      case Drivers::Watchdog::ResetReasons::SystemOff: return "off";
-      case Drivers::Watchdog::ResetReasons::LpComp: return "lpcomp";
-      case Drivers::Watchdog::ResetReasons::DebugInterface: return "dbg";
-      case Drivers::Watchdog::ResetReasons::ResetPin: return "rst";
-      default: return "?";
-    }
-  }();
-
-  // uptime
-  static constexpr uint32_t secondsInADay = 60*60*24;
-  static constexpr uint32_t secondsInAnHour = 60*60;
-  static constexpr uint32_t secondsInAMinute = 60;
-  uint32_t uptimeSeconds = dateTimeController.Uptime().count();
-  uint32_t uptimeDays = (uptimeSeconds / secondsInADay);
-  uptimeSeconds = uptimeSeconds % secondsInADay;
-  uint32_t uptimeHours = uptimeSeconds / secondsInAnHour;
-  uptimeSeconds = uptimeSeconds % secondsInAnHour;
-  uint32_t uptimeMinutes = uptimeSeconds / secondsInAMinute;
-  uptimeSeconds = uptimeSeconds % secondsInAMinute;
-  // TODO handle more than 100 days of uptime
-
-  sprintf(t1, "Pinetime\n"
-              "Version:%d.%d.%d\n"
-              "Build: %s\n"
-              "       %s\n"
-              "Date: %02d/%02d/%04d\n"
-              "Time: %02d:%02d:%02d\n"
-              "Uptime: %02lud %02lu:%02lu:%02lu\n"
-              "Battery: %d%%\n"
-              "Backlight: %d/3\n"
-              "Last reset: %s\n",
-              Version::Major(), Version::Minor(), Version::Patch(),
-              __DATE__, __TIME__,
-              dateTimeController.Day(), dateTimeController.Month(), dateTimeController.Year(),
-              dateTimeController.Hours(), dateTimeController.Minutes(), dateTimeController.Seconds(),
-              uptimeDays, uptimeHours, uptimeMinutes, uptimeSeconds,
-              batteryPercent, brightness, resetReason);
-
-  screens.emplace_back(t1);
-
-  auto& bleAddr = bleController.Address();
-  sprintf(t2, "BLE MAC: \n  %2x:%2x:%2x:%2x:%2x:%2x",
-          bleAddr[5], bleAddr[4], bleAddr[3], bleAddr[2], bleAddr[1], bleAddr[0]);
-  screens.emplace_back(t2);
-
-  strncpy(t3, "Hello from\nthe developper!", 27);
-
-  screens.emplace_back(t3);
-
-  auto &screen = screens[screenIndex];
-  screen.Show();
-}
-
-ScreenList::~ScreenList() {
-  lv_obj_clean(lv_scr_act());
-}
-
-bool ScreenList::Refresh() {
-  auto &screen = screens[screenIndex];
-  screen.Refresh();
-
-  return running;
-}
-
-bool ScreenList::OnButtonPushed() {
-  running = false;
-  return true;
-}
-
-bool ScreenList::OnTouchEvent(Pinetime::Applications::TouchEvents event) {
-  switch (event) {
-    case TouchEvents::SwipeDown:
-      if (screenIndex > 0) {
-        app->SetFullRefresh(DisplayApp::FullRefreshDirections::Down);
-        auto &oldScreen = screens[screenIndex];
-        oldScreen.Hide();
-        screenIndex--;
-        auto &newScreen = screens[screenIndex];
-        newScreen.Show();
-      }
-      return true;
-    case TouchEvents::SwipeUp:
-      app->SetFullRefresh(DisplayApp::FullRefreshDirections::Up);
-      if (screenIndex < screens.size() - 1) {
-        auto &oldScreen = screens[screenIndex];
-        oldScreen.Hide();
-        screenIndex++;
-        auto &newScreen = screens[screenIndex];
-        newScreen.Show();
-      }
-      return true;
-    default:
-      return false;
-  }
-  return false;
-}




diff --git a/src/DisplayApp/Screens/ScreenList.h b/src/DisplayApp/Screens/ScreenList.h
index b0ee016b2ea03433d270c7dbd1000c6e5e9f9e91..d873336d2d5ad362a70fcc9cf9592c2ca0169cf9 100644
--- a/src/DisplayApp/Screens/ScreenList.h
+++ b/src/DisplayApp/Screens/ScreenList.h
@@ -2,40 +2,64 @@ #pragma once
 
 #include <vector>
 #include <Components/Ble/NimbleController.h>
+#include <functional>
 #include "Screen.h"
 #include "Label.h"
 
 namespace Pinetime {
   namespace Applications {
     namespace Screens {
+      template <size_t N>
       class ScreenList : public Screen {
         public:
-          explicit ScreenList(DisplayApp* app,
-                              Pinetime::Controllers::DateTime& dateTimeController,
-                              Pinetime::Controllers::Battery& batteryController,
-                              Pinetime::Controllers::BrightnessController& brightnessController,
-                              Pinetime::Controllers::Ble& bleController,
-                              Pinetime::Drivers::WatchdogView& watchdog);
-          ~ScreenList() override;
-          bool Refresh() override;
-          bool OnButtonPushed() override;
-          bool OnTouchEvent(TouchEvents event) override;
-        private:
-          bool running = true;
-          uint8_t screenIndex = 0;
+          ScreenList(DisplayApp* app, std::array<std::function<std::unique_ptr<Screen>()>, N>&& screens)
+          : Screen(app), screens{std::move(screens)}, current{this->screens[0]()} {
+
+          }
 
-          // TODO choose another container without dynamic alloc
-          std::vector<Screens::Label> screens;
-          Pinetime::Controllers::DateTime& dateTimeController;
-          Pinetime::Controllers::Battery& batteryController;
-          Pinetime::Controllers::BrightnessController& brightnessController;
-          Pinetime::Controllers::Ble& bleController;
-          Pinetime::Drivers::WatchdogView& watchdog;
+          ~ScreenList() override {
 
+          }
 
-          char t1[200];
-          char t2[200];
-          char t3[30];
+          bool Refresh() override {
+            running = current->Refresh();
+            return running;
+          }
+
+          bool OnButtonPushed() override {
+            running = false;
+            return true;
+          }
+
+          bool OnTouchEvent(TouchEvents event) override {
+            switch (event) {
+              case TouchEvents::SwipeDown:
+                if (screenIndex > 0) {
+                  current.reset(nullptr);
+                  app->SetFullRefresh(DisplayApp::FullRefreshDirections::Down);
+                  screenIndex--;
+                  current = screens[screenIndex]();
+                }
+                return true;
+              case TouchEvents::SwipeUp:
+                if (screenIndex < screens.size() - 1) {
+                  current.reset(nullptr);
+                  app->SetFullRefresh(DisplayApp::FullRefreshDirections::Up);
+                  screenIndex++;
+                  current = screens[screenIndex]();
+                }
+                return true;
+              default:
+                return false;
+            }
+            return false;
+          }
+
+        private:
+          bool running = true;
+          uint8_t screenIndex = 0;
+          std::array<std::function<std::unique_ptr<Screen>()>, N> screens;
+          std::unique_ptr<Screen> current;
       };
     }
   }




diff --git a/src/DisplayApp/Screens/Symbols.h b/src/DisplayApp/Screens/Symbols.h
index 3104db873d9570a4f73229ce177befbc637aef26..940006d5dd50bac892d960c4fee0d3500c38a3d5 100644
--- a/src/DisplayApp/Screens/Symbols.h
+++ b/src/DisplayApp/Screens/Symbols.h
@@ -18,6 +18,10 @@         static constexpr char* clock = "\xEF\x80\x97";
         static constexpr char* info = "\xEF\x84\xA9";
         static constexpr char* list = "\xEF\x80\xBA";
         static constexpr char* sun = "\xEF\x86\x85";
+        static constexpr char* check = "\xEF\x95\xA0";
+        static constexpr char* music = "\xEF\x80\x81";
+        static constexpr char* tachometer = "\xEF\x8F\xBD";
+        static constexpr char* asterisk = "\xEF\x81\xA9";
       }
     }
   }




diff --git a/src/DisplayApp/Screens/SystemInfo.cpp b/src/DisplayApp/Screens/SystemInfo.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..b355f41929793a41674c1eceafd7d24b551a3a3b
--- /dev/null
+++ b/src/DisplayApp/Screens/SystemInfo.cpp
@@ -0,0 +1,114 @@
+#include <libs/lvgl/lvgl.h>
+#include <DisplayApp/DisplayApp.h>
+#include <functional>
+#include "SystemInfo.h"
+#include "../../Version.h"
+#include "Tile.h"
+
+using namespace Pinetime::Applications::Screens;
+
+SystemInfo::SystemInfo(Pinetime::Applications::DisplayApp *app,
+                       Pinetime::Controllers::DateTime &dateTimeController,
+                       Pinetime::Controllers::Battery& batteryController,
+                       Pinetime::Controllers::BrightnessController& brightnessController,
+                       Pinetime::Controllers::Ble& bleController,
+                       Pinetime::Drivers::WatchdogView& watchdog) :
+        Screen(app),
+        dateTimeController{dateTimeController}, batteryController{batteryController},
+        brightnessController{brightnessController}, bleController{bleController}, watchdog{watchdog},
+        screens{app, {
+                [this]() -> std::unique_ptr<Screen> { return CreateScreen1(); },
+                [this]() -> std::unique_ptr<Screen> { return CreateScreen2(); },
+                [this]() -> std::unique_ptr<Screen> { return CreateScreen3(); }
+          }
+        } {}
+
+
+SystemInfo::~SystemInfo() {
+  lv_obj_clean(lv_scr_act());
+}
+
+bool SystemInfo::Refresh() {
+  screens.Refresh();
+  return running;
+}
+
+bool SystemInfo::OnButtonPushed() {
+  running = false;
+  return true;
+}
+
+bool SystemInfo::OnTouchEvent(Pinetime::Applications::TouchEvents event) {
+  return screens.OnTouchEvent(event);
+}
+
+std::unique_ptr<Screen> SystemInfo::CreateScreen1() {
+  auto batteryPercent = static_cast<int16_t>(batteryController.PercentRemaining());
+  if(batteryPercent > 100) batteryPercent = 100;
+  else if(batteryPercent < 0) batteryPercent = 0;
+
+  uint8_t brightness = 0;
+  switch(brightnessController.Level()) {
+    case Controllers::BrightnessController::Levels::Low: brightness = 1; break;
+    case Controllers::BrightnessController::Levels::Medium: brightness = 2; break;
+    case Controllers::BrightnessController::Levels::High: brightness = 3; break;
+  }
+  auto resetReason = [this]() {
+    switch (watchdog.ResetReason()) {
+      case Drivers::Watchdog::ResetReasons::Watchdog: return "wtdg";
+      case Drivers::Watchdog::ResetReasons::HardReset: return "hardr";
+      case Drivers::Watchdog::ResetReasons::NFC: return "nfc";
+      case Drivers::Watchdog::ResetReasons::SoftReset: return "softr";
+      case Drivers::Watchdog::ResetReasons::CpuLockup: return "cpulock";
+      case Drivers::Watchdog::ResetReasons::SystemOff: return "off";
+      case Drivers::Watchdog::ResetReasons::LpComp: return "lpcomp";
+      case Drivers::Watchdog::ResetReasons::DebugInterface: return "dbg";
+      case Drivers::Watchdog::ResetReasons::ResetPin: return "rst";
+      default: return "?";
+    }
+  }();
+
+  // uptime
+  static constexpr uint32_t secondsInADay = 60*60*24;
+  static constexpr uint32_t secondsInAnHour = 60*60;
+  static constexpr uint32_t secondsInAMinute = 60;
+  uint32_t uptimeSeconds = dateTimeController.Uptime().count();
+  uint32_t uptimeDays = (uptimeSeconds / secondsInADay);
+  uptimeSeconds = uptimeSeconds % secondsInADay;
+  uint32_t uptimeHours = uptimeSeconds / secondsInAnHour;
+  uptimeSeconds = uptimeSeconds % secondsInAnHour;
+  uint32_t uptimeMinutes = uptimeSeconds / secondsInAMinute;
+  uptimeSeconds = uptimeSeconds % secondsInAMinute;
+  // TODO handle more than 100 days of uptime
+
+  sprintf(t1, "Pinetime\n"
+              "Version:%d.%d.%d\n"
+              "Build: %s\n"
+              "       %s\n"
+              "Date: %02d/%02d/%04d\n"
+              "Time: %02d:%02d:%02d\n"
+              "Uptime: %02lud %02lu:%02lu:%02lu\n"
+              "Battery: %d%%\n"
+              "Backlight: %d/3\n"
+              "Last reset: %s\n",
+          Version::Major(), Version::Minor(), Version::Patch(),
+          __DATE__, __TIME__,
+          dateTimeController.Day(), dateTimeController.Month(), dateTimeController.Year(),
+          dateTimeController.Hours(), dateTimeController.Minutes(), dateTimeController.Seconds(),
+          uptimeDays, uptimeHours, uptimeMinutes, uptimeSeconds,
+          batteryPercent, brightness, resetReason);
+
+  return std::unique_ptr<Screen>(new Screens::Label(app, t1));
+}
+
+std::unique_ptr<Screen> SystemInfo::CreateScreen2() {
+  auto& bleAddr = bleController.Address();
+  sprintf(t2, "BLE MAC: \n  %2x:%2x:%2x:%2x:%2x:%2x",
+          bleAddr[5], bleAddr[4], bleAddr[3], bleAddr[2], bleAddr[1], bleAddr[0]);
+  return std::unique_ptr<Screen>(new Screens::Label(app, t2));
+}
+
+std::unique_ptr<Screen> SystemInfo::CreateScreen3() {
+  strncpy(t3, "Hello from\nthe developper!", 27);
+  return std::unique_ptr<Screen>(new Screens::Label(app, t3));
+}




diff --git a/src/DisplayApp/Screens/SystemInfo.h b/src/DisplayApp/Screens/SystemInfo.h
new file mode 100644
index 0000000000000000000000000000000000000000..ac8abae5182d82a896caa90fb68c096b1621496c
--- /dev/null
+++ b/src/DisplayApp/Screens/SystemInfo.h
@@ -0,0 +1,47 @@
+#pragma once
+
+#include <vector>
+#include <Components/Ble/NimbleController.h>
+#include "Screen.h"
+#include "Label.h"
+#include "ScreenList.h"
+#include "Gauge.h"
+#include "Meter.h"
+#include <functional>
+
+namespace Pinetime {
+  namespace Applications {
+    namespace Screens {
+      class SystemInfo : public Screen {
+        public:
+          explicit SystemInfo(DisplayApp* app,
+                              Pinetime::Controllers::DateTime& dateTimeController,
+                              Pinetime::Controllers::Battery& batteryController,
+                              Pinetime::Controllers::BrightnessController& brightnessController,
+                              Pinetime::Controllers::Ble& bleController,
+                              Pinetime::Drivers::WatchdogView& watchdog);
+          ~SystemInfo() override;
+          bool Refresh() override;
+          bool OnButtonPushed() override;
+          bool OnTouchEvent(TouchEvents event) override;
+        private:
+          bool running = true;
+
+          Pinetime::Controllers::DateTime& dateTimeController;
+          Pinetime::Controllers::Battery& batteryController;
+          Pinetime::Controllers::BrightnessController& brightnessController;
+          Pinetime::Controllers::Ble& bleController;
+          Pinetime::Drivers::WatchdogView& watchdog;
+
+          char t1[200];
+          char t2[200];
+          char t3[30];
+
+          ScreenList<3> screens;
+          std::unique_ptr<Screen> CreateScreen1();
+          std::unique_ptr<Screen> CreateScreen2();
+          std::unique_ptr<Screen> CreateScreen3();
+      };
+    }
+  }
+}
\ No newline at end of file




diff --git a/src/DisplayApp/Screens/Tile.cpp b/src/DisplayApp/Screens/Tile.cpp
index c3a9d3806810164bcb852b2d8c0b950e0f3e2f74..5d4da2cfdcf9c69b9db672541323ce5208366777 100644
--- a/src/DisplayApp/Screens/Tile.cpp
+++ b/src/DisplayApp/Screens/Tile.cpp
@@ -17,9 +17,16 @@   uint32_t eventData = *eventDataPtr;
   screen->OnObjectEvent(obj, event, eventData);
 }
 
-static const char * btnm_map1[] = {Symbols::heartBeat, Symbols::shoe, Symbols::clock, "\n", Symbols::info, Symbols::list, Symbols::sun, ""};
-
-Tile::Tile(DisplayApp* app) : Screen(app) {
+Tile::Tile(DisplayApp* app, std::array<Applications, 6>& applications) : Screen(app) {
+  for(int i = 0, appIndex = 0; i < 8; i++) {
+    if(i == 3) btnm_map1[i] = "\n";
+    else if(i == 7) btnm_map1[i] = "";
+    else {
+      btnm_map1[i] = applications[appIndex].icon;
+      apps[appIndex] = applications[appIndex].application;
+      appIndex++;
+    }
+  }
   modal.reset(new Modal(app));
 
   btnm1 = lv_btnm_create(lv_scr_act(), NULL);
@@ -41,61 +48,15 @@
 void Tile::OnObjectEvent(lv_obj_t *obj, lv_event_t event, uint32_t buttonId) {
   auto* tile = static_cast<Tile*>(obj->user_data);
   if(event == LV_EVENT_VALUE_CHANGED) {
-    switch(buttonId) {
-      case 0:
-        tile->StartMeterApp();
-        break;
-      case 1:
-        tile->StartGaugeApp();
-        break;
-      case 2:
-        tile->StartClockApp();
-        break;
-      case 3:
-        char versionStr[20];
-        sprintf(versionStr, "VERSION: %d.%d.%d", Version::Major(), Version::Minor(), Version::Patch());
-        modal->Show(versionStr);
-        break;
-      case 4:
-        tile->StartSysInfoApp();
-        break;
-      case 5:
-        tile->StartBrightnessApp();
-
-        break;
-    }
-    clickCount++;
+    app->StartApp(apps[buttonId]);
+    running = false;
   }
 }
 
 bool Tile::OnButtonPushed() {
-  app->StartApp(DisplayApp::Apps::Clock);
+  app->StartApp(Apps::Clock);
   running = false;
   return true;
 }
 
-void Tile::StartClockApp() {
-  app->StartApp(DisplayApp::Apps::Clock);
-  running = false;
-}
-
-void Tile::StartSysInfoApp() {
-  app->StartApp(DisplayApp::Apps::SysInfo);
-  running = false;
-}
-
-void Tile::StartBrightnessApp() {
-  app->StartApp(DisplayApp::Apps::Brightness);
-  running = false;
-}
-
-void Tile::StartMeterApp() {
-  app->StartApp(DisplayApp::Apps::Meter);
-  running = false;
-}
-
-void Tile::StartGaugeApp() {
-  app->StartApp(DisplayApp::Apps::Music);
-  running = false;
-}
 




diff --git a/src/DisplayApp/Screens/Tile.h b/src/DisplayApp/Screens/Tile.h
index a04b58a830e0ba588f506f11da3a8cad24558fc9..3136d892526c8c837fd6f9e375736f7b72bcbf19 100644
--- a/src/DisplayApp/Screens/Tile.h
+++ b/src/DisplayApp/Screens/Tile.h
@@ -5,13 +5,19 @@ #include "Screen.h"
 #include <bits/unique_ptr.h>
 #include "Modal.h"
 #include <lvgl/src/lv_core/lv_style.h>
+#include <DisplayApp/Apps.h>
 
 namespace Pinetime {
   namespace Applications {
     namespace Screens {
       class Tile : public Screen {
         public:
-          explicit Tile(DisplayApp* app);
+          struct Applications {
+            const char* icon;
+            Pinetime::Applications::Apps application;
+          };
+
+          explicit Tile(DisplayApp* app, std::array<Applications, 6>& applications);
           ~Tile() override;
 
           bool Refresh() override;
@@ -20,40 +26,13 @@
           void OnObjectEvent(lv_obj_t* obj, lv_event_t event, uint32_t buttonId);
 
         private:
-
-          lv_style_t* labelRelStyle;
-          lv_style_t* labelPrStyle;
-          lv_obj_t * label1;
-          lv_obj_t * label2;
-          lv_obj_t * label3;
-
-          lv_obj_t* backgroundLabel;
-          lv_obj_t * button;
-          lv_obj_t * labelClick;
-
-          lv_obj_t *tileview;
-          lv_obj_t * tile1;
-          lv_obj_t * tile2;
-          lv_obj_t * list;
-          lv_obj_t * list_btn;
-          lv_obj_t * tile3;
-          lv_obj_t * btn1;
-          lv_obj_t * btn2;
-          lv_obj_t * btn3;
-
           lv_obj_t * btnm1;
-          lv_obj_t * btnm2;
-
-          uint32_t clickCount = 0 ;
-          uint32_t previousClickCount = 0;
-          void StartClockApp();
-          void StartSysInfoApp();
-          void StartMeterApp();
-          void StartGaugeApp();
           bool running = true;
 
           std::unique_ptr<Modal> modal;
-          void StartBrightnessApp();
+
+          const char* btnm_map1[8];
+          Pinetime::Applications::Apps apps[6];
       };
     }
   }