Skip to content

Commit 5f3d912

Browse files
committed
Make center divider contrast in dark mode
Previously the center climb-rate divider line was always set to black. Update applies darkMode to choose white when in dark mode (otherwise black) so the center line contrasts with the screen background. Also reworded the comment to reflect the contrast behavior.
1 parent 96d643d commit 5f3d912

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/sp140/lvgl/lvgl_main_screen.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,9 +586,9 @@ void setupMainScreen(bool darkMode) {
586586

587587
lv_line_set_points(climb_rate_divider_lines[i], line_points[i], 2);
588588

589-
// Make the center line (line 6) special: 3 pixels wide and black
589+
// Make the center line (line 6) special: 3 pixels wide; contrasts with screen bg
590590
if (i == 6) {
591-
lv_obj_set_style_line_color(climb_rate_divider_lines[i], LVGL_BLACK, LV_PART_MAIN);
591+
lv_obj_set_style_line_color(climb_rate_divider_lines[i], darkMode ? LVGL_WHITE : LVGL_BLACK, LV_PART_MAIN);
592592
lv_obj_set_style_line_width(climb_rate_divider_lines[i], 3, LV_PART_MAIN);
593593
} else {
594594
lv_obj_set_style_line_color(climb_rate_divider_lines[i], LVGL_GRAY, LV_PART_MAIN);

0 commit comments

Comments
 (0)