From be505fc15fef5d87c311a442f291dd1cbd86fd40 Mon Sep 17 00:00:00 2001 From: Kieran Cawthray Date: Mon, 21 Jun 2021 20:06:47 +0200 Subject: [PATCH] Set step gauge outer to be white when step goal is reached --- src/displayapp/screens/PineTimeStyle.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/displayapp/screens/PineTimeStyle.cpp b/src/displayapp/screens/PineTimeStyle.cpp index 6f7ec3a0..0dc4117c 100644 --- a/src/displayapp/screens/PineTimeStyle.cpp +++ b/src/displayapp/screens/PineTimeStyle.cpp @@ -329,8 +329,12 @@ bool PineTimeStyle::Refresh() { stepCount = motionController.NbSteps(); motionSensorOk = motionController.IsSensorOk(); if (stepCount.IsUpdated() || motionSensorOk.IsUpdated()) { - lv_gauge_set_value(stepGauge, 0, (stepCount.Get() / 100)); - lv_obj_realign(stepGauge); + lv_gauge_set_value(stepGauge, 0, (stepCount.Get() / 100)); + lv_obj_realign(stepGauge); + if (stepCount.Get() > settingsController.GetStepsGoal()) { + lv_obj_set_style_local_line_color(stepGauge, LV_GAUGE_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_WHITE); + lv_obj_set_style_local_scale_grad_color(stepGauge, LV_GAUGE_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_WHITE); + } } return running;