diff options
Diffstat (limited to 'src/displayapp/screens/WatchFaceTerminal.cpp')
| -rw-r--r-- | src/displayapp/screens/WatchFaceTerminal.cpp | 34 |
1 files changed, 7 insertions, 27 deletions
diff --git a/src/displayapp/screens/WatchFaceTerminal.cpp b/src/displayapp/screens/WatchFaceTerminal.cpp index c899648..63ea2e7 100644 --- a/src/displayapp/screens/WatchFaceTerminal.cpp +++ b/src/displayapp/screens/WatchFaceTerminal.cpp @@ -30,42 +30,22 @@ WatchFaceTerminal::WatchFaceTerminal(DisplayApp* app, settingsController {settingsController}, heartRateController {heartRateController}, motionController {motionController} { - settingsController.SetClockFace(3); - batteryValue = lv_label_create(lv_scr_act(), nullptr); - lv_label_set_recolor(batteryValue, true); - lv_obj_align(batteryValue, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, -20); + 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; + } - connectState = lv_label_create(lv_scr_act(), nullptr); + lv_label_set_recolor(batteryValue, true); lv_label_set_recolor(connectState, true); - lv_obj_align(connectState, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, 40); - - notificationIcon = lv_label_create(lv_scr_act(), nullptr); - lv_obj_align(notificationIcon, nullptr, LV_ALIGN_IN_LEFT_MID, 0, -100); - - label_date = lv_label_create(lv_scr_act(), nullptr); lv_label_set_recolor(label_date, true); - lv_obj_align(label_date, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, -40); - - label_prompt_1 = lv_label_create(lv_scr_act(), nullptr); - lv_obj_align(label_prompt_1, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, -80); lv_label_set_text_static(label_prompt_1, "user@watch:~ $ now"); - - label_prompt_2 = lv_label_create(lv_scr_act(), nullptr); - lv_obj_align(label_prompt_2, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, 60); 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); - lv_obj_align(label_time, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, -60); - - heartbeatValue = lv_label_create(lv_scr_act(), nullptr); lv_label_set_recolor(heartbeatValue, true); - lv_obj_align(heartbeatValue, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, 20); - - stepValue = lv_label_create(lv_scr_act(), nullptr); lv_label_set_recolor(stepValue, true); - lv_obj_align(stepValue, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, 0); taskRefresh = lv_task_create(RefreshTaskCallback, LV_DISP_DEF_REFR_PERIOD, LV_TASK_PRIO_MID, this); Refresh(); |
