diff options
author | Kieran Cawthray <kieranc@gmail.com> | 2021-06-21 20:06:47 +0200 |
---|---|---|
committer | Kieran Cawthray <kieranc@gmail.com> | 2021-06-21 20:06:47 +0200 |
commit | be505fc15fef5d87c311a442f291dd1cbd86fd40 (patch) | |
tree | 6cc1dce49233c9489a0b249d665708c118e6446a | |
parent | 266573deff61b25e924738bc046c03edfeeb0ef8 (diff) |
Set step gauge outer to be white when step goal is reached
-rw-r--r-- | src/displayapp/screens/PineTimeStyle.cpp | 8 |
1 files 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; |