summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/PineTimeStyle.cpp
diff options
context:
space:
mode:
authorKieran Cawthray <kieranc@gmail.com>2021-06-21 20:06:47 +0200
committerKieran Cawthray <kieranc@gmail.com>2021-06-21 20:06:47 +0200
commitbe505fc15fef5d87c311a442f291dd1cbd86fd40 (patch)
tree6cc1dce49233c9489a0b249d665708c118e6446a /src/displayapp/screens/PineTimeStyle.cpp
parent266573deff61b25e924738bc046c03edfeeb0ef8 (diff)
Set step gauge outer to be white when step goal is reached
Diffstat (limited to 'src/displayapp/screens/PineTimeStyle.cpp')
-rw-r--r--src/displayapp/screens/PineTimeStyle.cpp8
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;