summaryrefslogtreecommitdiff
path: root/src/displayapp/widgets/Counter.cpp
diff options
context:
space:
mode:
authorRiku Isokoski <riksu9000@gmail.com>2022-05-18 23:16:00 +0300
committerJF <JF002@users.noreply.github.com>2022-06-06 21:28:03 +0200
commit41c461d1f676d7e63a9bc7bc3edc380550e417f3 (patch)
treece799fe34a1b2cef877c3bf3907859522c6dba7f /src/displayapp/widgets/Counter.cpp
parent17cedd6629249776c82140ffe9100c235b9c1525 (diff)
Move linePoints to a member variable
Diffstat (limited to 'src/displayapp/widgets/Counter.cpp')
-rw-r--r--src/displayapp/widgets/Counter.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/displayapp/widgets/Counter.cpp b/src/displayapp/widgets/Counter.cpp
index 08c48044..7c8bf7b1 100644
--- a/src/displayapp/widgets/Counter.cpp
+++ b/src/displayapp/widgets/Counter.cpp
@@ -89,17 +89,18 @@ void Counter::Create() {
lv_label_set_text_static(downLabel, "-");
lv_obj_align(downLabel, nullptr, LV_ALIGN_CENTER, 0, 0);
- static lv_point_t line_points[] = {{0, 0}, {width, 0}};
+ linePoints[0] = {0, 0};
+ linePoints[1] = {width, 0};
lv_obj_t* upperLine = lv_line_create(counterContainer, nullptr);
- lv_line_set_points(upperLine, line_points, 2);
+ lv_line_set_points(upperLine, linePoints, 2);
lv_obj_set_style_local_line_width(upperLine, LV_LINE_PART_MAIN, LV_STATE_DEFAULT, 1);
lv_obj_set_style_local_line_color(upperLine, LV_LINE_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_WHITE);
lv_obj_set_style_local_line_opa(upperLine, LV_LINE_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_20);
lv_obj_align(upperLine, upBtn, LV_ALIGN_OUT_BOTTOM_MID, 0, 0);
lv_obj_t* lowerLine = lv_line_create(counterContainer, nullptr);
- lv_line_set_points(lowerLine, line_points, 2);
+ lv_line_set_points(lowerLine, linePoints, 2);
lv_obj_set_style_local_line_width(lowerLine, LV_LINE_PART_MAIN, LV_STATE_DEFAULT, 1);
lv_obj_set_style_local_line_color(lowerLine, LV_LINE_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_WHITE);
lv_obj_set_style_local_line_opa(lowerLine, LV_LINE_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_20);