summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichele Bini <michele.bini@gmail.com>2022-05-18 17:33:01 (GMT)
committerMichele Bini <michele.bini@gmail.com>2022-05-18 17:33:01 (GMT)
commita804c8c0eff0ac2065f1d899b7c9541f6c548199 (patch)
treee7a0007411f7e099320df98c41678deb0c87c4fd
parent112b3212fe29936757df657ca7cdd9692d71baec (diff)
Revert "Further compress code for WatchFaceTerminal"
This reverts commit c158acdb1a032206d224fb7890d11fc4e7f915f3.
-rw-r--r--src/displayapp/screens/WatchFaceTerminal.cpp35
1 files changed, 25 insertions, 10 deletions
diff --git a/src/displayapp/screens/WatchFaceTerminal.cpp b/src/displayapp/screens/WatchFaceTerminal.cpp
index b1e3350..8569f6c 100644
--- a/src/displayapp/screens/WatchFaceTerminal.cpp
+++ b/src/displayapp/screens/WatchFaceTerminal.cpp
@@ -30,6 +30,25 @@ WatchFaceTerminal::WatchFaceTerminal(DisplayApp* app,
settingsController {settingsController},
heartRateController {heartRateController},
motionController {motionController} {
+ batteryValue = lv_label_create(lv_scr_act(), nullptr);
+ lv_label_set_recolor(batteryValue, true);
+
+ connectState = lv_label_create(lv_scr_act(), nullptr);
+ lv_label_set_recolor(connectState, true);
+
+ notificationIcon = lv_label_create(lv_scr_act(), nullptr);
+
+ label_date = lv_label_create(lv_scr_act(), nullptr);
+ lv_label_set_recolor(label_date, true);
+
+ label_prompt_1 = lv_label_create(lv_scr_act(), nullptr);
+ lv_label_set_text_static(label_prompt_1, "user@watch:~ $ now");
+
+ label_prompt_2 = lv_label_create(lv_scr_act(), nullptr);
+ lv_label_set_text_static(label_prompt_2, "user@watch:~ $");
+
+ label_time = lv_label_create(lv_scr_act(), nullptr);
+ lv_label_set_recolor(label_time, true);
backgroundLabel = lv_label_create(lv_scr_act(), nullptr);
lv_obj_set_click(backgroundLabel, true);
@@ -38,22 +57,18 @@ WatchFaceTerminal::WatchFaceTerminal(DisplayApp* app,
lv_obj_set_pos(backgroundLabel, 0, 0);
lv_label_set_text_static(backgroundLabel, "");
+ heartbeatValue = lv_label_create(lv_scr_act(), nullptr);
+ lv_label_set_recolor(heartbeatValue, true);
+
+ stepValue = lv_label_create(lv_scr_act(), nullptr);
+ lv_label_set_recolor(stepValue, true);
+
uint16_t y = -100;
for (auto line : lines) {
- line = lv_label_create(lv_scr_act(), nullptr);
lv_obj_align(line, nullptr, LV_ALIGN_IN_LEFT_MID, 0, y);
y += 20;
}
- lv_label_set_recolor(batteryValue, true);
- lv_label_set_recolor(connectState, true);
- lv_label_set_recolor(label_date, true);
- lv_label_set_text_static(label_prompt_1, "user@watch:~ $ now");
- lv_label_set_text_static(label_prompt_2, "user@watch:~ $");
- lv_label_set_recolor(label_time, true);
- lv_label_set_recolor(heartbeatValue, true);
- lv_label_set_recolor(stepValue, true);
-
taskRefresh = lv_task_create(RefreshTaskCallback, LV_DISP_DEF_REFR_PERIOD, LV_TASK_PRIO_MID, this);
Refresh();
}