fix(color): timer widget displays wrong UI for count up timers (#5935)

This commit is contained in:
philmoz
2025-02-21 10:54:10 +10:00
committed by GitHub
parent 16a7d02d50
commit 088c8e2e35
+2 -2
View File
@@ -137,7 +137,7 @@ class TimerWidget : public Widget
lv_label_set_text(unit0, sUnit0); lv_label_set_text(unit0, sUnit0);
lv_label_set_text(unit1, sUnit1); lv_label_set_text(unit1, sUnit1);
if (lastValue > 0) { if (lastValue > 0 && lastStartValue > 0) {
lv_obj_clear_flag(timerArc, LV_OBJ_FLAG_HIDDEN); lv_obj_clear_flag(timerArc, LV_OBJ_FLAG_HIDDEN);
timerIcon->hide(); timerIcon->hide();
} else { } else {
@@ -209,7 +209,7 @@ class TimerWidget : public Widget
protected: protected:
tmrval_t lastValue = 0; tmrval_t lastValue = 0;
uint32_t lastStartValue = 0; uint32_t lastStartValue = -1;
bool isLarge = false; bool isLarge = false;
lv_style_t style; lv_style_t style;
lv_obj_t* nameLabel = nullptr; lv_obj_t* nameLabel = nullptr;