From 7c7a8602c473bc160506e064097bd9ecc204425b Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Wed, 22 Feb 2023 22:05:37 +0200 Subject: screens: Remove displayapp parameter from screen The DisplayApp class isn't used in the Screen base class and most screens, so requiring it is pointless. In this commit, DisplayApp pointers were added to screens which use it and the explicit Screen constructor was removed in those screens. --- src/displayapp/screens/SystemInfo.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/displayapp/screens/SystemInfo.cpp') diff --git a/src/displayapp/screens/SystemInfo.cpp b/src/displayapp/screens/SystemInfo.cpp index 7b399bd2..a63fc287 100644 --- a/src/displayapp/screens/SystemInfo.cpp +++ b/src/displayapp/screens/SystemInfo.cpp @@ -38,7 +38,7 @@ SystemInfo::SystemInfo(Pinetime::Applications::DisplayApp* app, Pinetime::Drivers::WatchdogView& watchdog, Pinetime::Controllers::MotionController& motionController, const Pinetime::Drivers::Cst816S& touchPanel) - : Screen(app), + : app {app}, dateTimeController {dateTimeController}, batteryController {batteryController}, brightnessController {brightnessController}, @@ -94,7 +94,7 @@ std::unique_ptr SystemInfo::CreateScreen1() { BootloaderVersion::VersionString()); lv_label_set_align(label, LV_LABEL_ALIGN_CENTER); lv_obj_align(label, lv_scr_act(), LV_ALIGN_CENTER, 0, 0); - return std::make_unique(0, 5, app, label); + return std::make_unique(0, 5, label); } std::unique_ptr SystemInfo::CreateScreen2() { @@ -173,7 +173,7 @@ std::unique_ptr SystemInfo::CreateScreen2() { touchPanel.GetFwVersion(), TARGET_DEVICE_NAME); lv_obj_align(label, lv_scr_act(), LV_ALIGN_CENTER, 0, 0); - return std::make_unique(1, 5, app, label); + return std::make_unique(1, 5, label); } std::unique_ptr SystemInfo::CreateScreen3() { @@ -204,7 +204,7 @@ std::unique_ptr SystemInfo::CreateScreen3() { mon.frag_pct, static_cast(mon.free_biggest_size)); lv_obj_align(label, lv_scr_act(), LV_ALIGN_CENTER, 0, 0); - return std::make_unique(2, 5, app, label); + return std::make_unique(2, 5, label); } bool SystemInfo::sortById(const TaskStatus_t& lhs, const TaskStatus_t& rhs) { @@ -265,7 +265,7 @@ std::unique_ptr SystemInfo::CreateScreen4() { } lv_table_set_cell_value(infoTask, i + 1, 3, buffer); } - return std::make_unique(3, 5, app, infoTask); + return std::make_unique(3, 5, infoTask); } std::unique_ptr SystemInfo::CreateScreen5() { @@ -282,5 +282,5 @@ std::unique_ptr SystemInfo::CreateScreen5() { "#FFFF00 InfiniTime#"); lv_label_set_align(label, LV_LABEL_ALIGN_CENTER); lv_obj_align(label, lv_scr_act(), LV_ALIGN_CENTER, 0, 0); - return std::make_unique(4, 5, app, label); + return std::make_unique(4, 5, label); } -- cgit v1.2.3-70-g09d2