From ec2469a6c1efea44692cf5e3a90160f96a6013d3 Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Sun, 25 Jul 2021 17:54:05 +0300 Subject: Code cleanup (#466) * Code cleanup * Remove override again --- src/displayapp/screens/Steps.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'src/displayapp/screens/Steps.cpp') diff --git a/src/displayapp/screens/Steps.cpp b/src/displayapp/screens/Steps.cpp index 6aabd30e..d72e8333 100644 --- a/src/displayapp/screens/Steps.cpp +++ b/src/displayapp/screens/Steps.cpp @@ -5,13 +5,10 @@ using namespace Pinetime::Applications::Screens; -Steps::Steps( - Pinetime::Applications::DisplayApp *app, - Controllers::MotionController& motionController, - Controllers::Settings &settingsController) - : Screen(app), - motionController{motionController}, - settingsController{settingsController} { +Steps::Steps(Pinetime::Applications::DisplayApp* app, + Controllers::MotionController& motionController, + Controllers::Settings& settingsController) + : Screen(app), motionController {motionController}, settingsController {settingsController} { stepsArc = lv_arc_create(lv_scr_act(), nullptr); @@ -34,12 +31,12 @@ Steps::Steps( lv_label_set_text_fmt(lSteps, "%li", stepsCount); lv_obj_align(lSteps, nullptr, LV_ALIGN_CENTER, 0, -20); - lv_obj_t * lstepsL = lv_label_create(lv_scr_act(), nullptr); + lv_obj_t* lstepsL = lv_label_create(lv_scr_act(), nullptr); lv_obj_set_style_local_text_color(lstepsL, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x111111)); lv_label_set_text_static(lstepsL, "Steps"); lv_obj_align(lstepsL, lSteps, LV_ALIGN_OUT_BOTTOM_MID, 0, 10); - lv_obj_t * lstepsGoal = lv_label_create(lv_scr_act(), nullptr); + lv_obj_t* lstepsGoal = lv_label_create(lv_scr_act(), nullptr); lv_obj_set_style_local_text_color(lstepsGoal, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_CYAN); lv_label_set_text_fmt(lstepsGoal, "Goal\n%lu", settingsController.GetStepsGoal()); lv_label_set_align(lstepsGoal, LV_LABEL_ALIGN_CENTER); @@ -59,10 +56,10 @@ Steps::~Steps() { bool Steps::Refresh() { stepsCount = motionController.NbSteps(); - + lv_label_set_text_fmt(lSteps, "%li", stepsCount); lv_obj_align(lSteps, nullptr, LV_ALIGN_CENTER, 0, -20); - + lv_arc_set_value(stepsArc, int16_t(500 * stepsCount / settingsController.GetStepsGoal())); return running; -- cgit v1.2.3