diff --git a/src/displayapp/screens/WatchFaceHorizon.cpp b/src/displayapp/screens/WatchFaceHorizon.cpp index 0daa34b3..0f742a8b 100644 --- a/src/displayapp/screens/WatchFaceHorizon.cpp +++ b/src/displayapp/screens/WatchFaceHorizon.cpp @@ -61,7 +61,7 @@ WatchFaceHorizon::WatchFaceHorizon(Controllers::DateTime& dateTimeController, hourLines[i] = lv_line_create(lv_scr_act(), nullptr); lv_style_init(&hourLineStyles[i]); lv_style_set_line_width(&hourLineStyles[i], LV_STATE_DEFAULT, 5); - lv_style_set_line_color(&hourLineStyles[i], LV_STATE_DEFAULT, lv_color_hex(hourlyColors[i])); + lv_style_set_line_color(&hourLineStyles[i], LV_STATE_DEFAULT, lv_color_hex(hourlyColors[static_cast(floor(i/2.5))])); lv_obj_add_style(hourLines[i], LV_LINE_PART_MAIN, &hourLineStyles[i]); hourLinePoints[i][0] = {static_cast(i * 4), 237}; hourLinePoints[i][1] = {static_cast((i + 1) * 4), 237}; @@ -173,6 +173,15 @@ void WatchFaceHorizon::Refresh() { } sprintf(hoursChar, "%02d", displayHour); + // Update hour bar on bottom + for (int i = 0; i < 60; i++) { + if (i <= second) { + lv_obj_set_hidden(hourLines[i], false); + } else { + lv_obj_set_hidden(hourLines[i], true); + } + } + // Hour has updated if (hoursChar[0] != displayedChar[0] || hoursChar[1] != displayedChar[1]) { displayedChar[0] = hoursChar[0]; @@ -187,14 +196,7 @@ void WatchFaceHorizon::Refresh() { lv_label_set_text_fmt(labelHourFirstDigit, "%c", hoursChar[0]); lv_label_set_text_fmt(labelHourSecondDigit, "%c", hoursChar[1]); - // Update hour bar on bottom - for (int i = 0; i < 60; i++) { - if (i <= second) { - lv_obj_set_hidden(hourLines[i], false); - } else { - lv_obj_set_hidden(hourLines[i], true); - } - } + } // Minutes have updated