Skip to content

Commit 8dae4c8

Browse files
committed
terminal: Replace notification icon with a text entry
1 parent 2803dd6 commit 8dae4c8

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

src/displayapp/screens/WatchFaceTerminal.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ WatchFaceTerminal::WatchFaceTerminal(DisplayApp* app,
5050
lv_obj_align(connectState, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, 40);
5151

5252
notificationIcon = lv_label_create(lv_scr_act(), nullptr);
53-
lv_label_set_text(notificationIcon, NotificationIcon::GetIcon(false));
54-
lv_obj_align(notificationIcon, nullptr, LV_ALIGN_IN_TOP_LEFT, 10, 0);
53+
lv_label_set_recolor(notificationIcon, true);
54+
lv_label_set_text(notificationIcon, "[NOTI]#387b54 ---");
55+
lv_obj_align(notificationIcon, nullptr, LV_ALIGN_IN_LEFT_MID, 0, 60);
5556

5657
label_date = lv_label_create(lv_scr_act(), nullptr);
5758
lv_label_set_recolor(label_date, true);
@@ -62,7 +63,7 @@ WatchFaceTerminal::WatchFaceTerminal(DisplayApp* app,
6263
lv_label_set_text(label_prompt_1, "user@watch:~ $ now");
6364

6465
label_prompt_2 = lv_label_create(lv_scr_act(), nullptr);
65-
lv_obj_align(label_prompt_2, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, 60);
66+
lv_obj_align(label_prompt_2, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, 80);
6667
lv_label_set_text(label_prompt_2, "user@watch:~ $");
6768

6869
label_time = lv_label_create(lv_scr_act(), nullptr);
@@ -130,9 +131,9 @@ void WatchFaceTerminal::Refresh() {
130131
notificationState = notificatioManager.AreNewNotificationsAvailable();
131132
if (notificationState.IsUpdated()) {
132133
if (notificationState.Get()) {
133-
lv_label_set_text(notificationIcon, NotificationIcon::GetIcon(true));
134+
lv_label_set_text_static(notificationIcon, "[NOTI]#387b54 Unread");
134135
} else {
135-
lv_label_set_text(notificationIcon, NotificationIcon::GetIcon(false));
136+
lv_label_set_text_static(notificationIcon, "[NOTI]#387b54 ---");
136137
}
137138
}
138139

0 commit comments

Comments
 (0)