Skip to content

Commit a317bd3

Browse files
committed
Match steps app styling
Explicitly bars on screen and text on bars
1 parent e5b9230 commit a317bd3

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/displayapp/screens/HeartRateZone.cpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,19 @@ HeartRateZone::HeartRateZone(Controllers::HeartRateController& heartRateControll
1919
zone_bar[i] = lv_bar_create(screen, nullptr);
2020

2121
total += activity.zoneTime[i];
22-
lv_obj_set_style_local_line_color(zone_bar[i], LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, Colors::bgAlt);
22+
23+
lv_obj_set_style_local_bg_opa(zone_bar[i], LV_BAR_PART_BG, LV_STATE_DEFAULT, LV_OPA_0);
24+
lv_obj_set_style_local_line_color(zone_bar[i], LV_BAR_PART_BG, LV_STATE_DEFAULT, Colors::bgAlt);
25+
lv_obj_set_style_local_border_width(zone_bar[i], LV_BAR_PART_BG, LV_STATE_DEFAULT, 2);
26+
lv_obj_set_style_local_radius(zone_bar[i], LV_BAR_PART_BG, LV_STATE_DEFAULT, 0);
27+
2328
lv_obj_set_size(zone_bar[i], 240, 20);
24-
lv_obj_align(zone_bar[i], nullptr, LV_ALIGN_IN_TOP_LEFT, 10, 25 * i);
29+
lv_obj_align(zone_bar[i], screen, LV_ALIGN_IN_TOP_MID, 0, 25 * i);
2530

2631
label_time[i] = lv_label_create(zone_bar[i],nullptr);
27-
lv_obj_align(zone_bar[i], nullptr, LV_ALIGN_CENTER, 0, 0);
32+
lv_obj_align(label_time[i], zone_bar[i], LV_ALIGN_CENTER, 0, 0);
33+
34+
lv_obj_set_style_local_text_color(label_time[i], LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_CYAN);
2835
}
2936

3037
lv_label_set_text_static(label_time[0], "Warm Up");

0 commit comments

Comments
 (0)