Set step gauge outer to be white when step goal is reached

This commit is contained in:
Kieran Cawthray 2021-06-21 20:06:47 +02:00
parent 266573deff
commit be505fc15f

View file

@ -331,6 +331,10 @@ bool PineTimeStyle::Refresh() {
if (stepCount.IsUpdated() || motionSensorOk.IsUpdated()) { if (stepCount.IsUpdated() || motionSensorOk.IsUpdated()) {
lv_gauge_set_value(stepGauge, 0, (stepCount.Get() / 100)); lv_gauge_set_value(stepGauge, 0, (stepCount.Get() / 100));
lv_obj_realign(stepGauge); 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; return running;