From 074d3420c812e89e23c95cc36db78749ff553428 Mon Sep 17 00:00:00 2001 From: Kieran Cawthray Date: Wed, 20 Oct 2021 11:30:06 +0200 Subject: [PATCH] Ensure needle color is visible on reset/randomize --- src/displayapp/screens/PineTimeStyle.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/displayapp/screens/PineTimeStyle.cpp b/src/displayapp/screens/PineTimeStyle.cpp index 21599cc4..98f15ef0 100644 --- a/src/displayapp/screens/PineTimeStyle.cpp +++ b/src/displayapp/screens/PineTimeStyle.cpp @@ -497,6 +497,7 @@ void PineTimeStyle::UpdateSelected(lv_obj_t* object, lv_event_t event) { lv_obj_set_style_local_bg_color(timebar, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, Convert(valueBG)); } if (object == btnReset) { + needle_colors[0] = LV_COLOR_WHITE; settingsController.SetPTSColorTime(Controllers::Settings::Colors::Teal); lv_obj_set_style_local_text_color(timeDD1, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, Convert(Controllers::Settings::Colors::Teal)); lv_obj_set_style_local_text_color(timeDD2, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, Convert(Controllers::Settings::Colors::Teal)); @@ -517,6 +518,11 @@ void PineTimeStyle::UpdateSelected(lv_obj_t* object, lv_event_t event) { if (randBar == 3) { randBar -= 1; } + if (randBar == 0) { + needle_colors[0] = LV_COLOR_BLACK; + } else { + needle_colors[0] = LV_COLOR_WHITE; + } settingsController.SetPTSColorTime(static_cast(randTime)); lv_obj_set_style_local_text_color(timeDD1, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, Convert(static_cast(randTime))); lv_obj_set_style_local_text_color(timeDD2, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, Convert(static_cast(randTime)));