fix(color): timer widget displays wrong UI for count up timers (#5935)
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user