diff options
Diffstat (limited to 'src/displayapp/screens/WatchFaceDigital.cpp')
| -rw-r--r-- | src/displayapp/screens/WatchFaceDigital.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/displayapp/screens/WatchFaceDigital.cpp b/src/displayapp/screens/WatchFaceDigital.cpp index 4c0ae84..6d80742 100644 --- a/src/displayapp/screens/WatchFaceDigital.cpp +++ b/src/displayapp/screens/WatchFaceDigital.cpp @@ -5,6 +5,7 @@ #include <cstdio> #include "displayapp/screens/BatteryIcon.h" #include "displayapp/screens/BleIcon.h" +#include "displayapp/screens/NotificationIcon.h" #include "displayapp/screens/Symbols.h" #include "components/battery/BatteryController.h" #include "components/ble/BleController.h" @@ -43,6 +44,11 @@ WatchFaceDigital::WatchFaceDigital(DisplayApp* app, lv_label_set_text_static(bleIcon, Symbols::bluetooth); lv_obj_align(bleIcon, batteryPlug, LV_ALIGN_OUT_LEFT_MID, -5, 0); + notificationIcon = lv_label_create(lv_scr_act(), nullptr); + lv_obj_set_style_local_text_color(notificationIcon, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x00FF00)); + lv_label_set_text_static(notificationIcon, NotificationIcon::GetIcon(false)); + lv_obj_align(notificationIcon, nullptr, LV_ALIGN_IN_TOP_LEFT, 0, 0); + label_date = lv_label_create(lv_scr_act(), nullptr); lv_obj_align(label_date, nullptr, LV_ALIGN_CENTER, 0, 60); lv_obj_set_auto_realign(label_date, true); @@ -100,6 +106,11 @@ void WatchFaceDigital::Refresh() { lv_obj_realign(batteryPlug); lv_obj_realign(bleIcon); + notificationState = notificatioManager.AreNewNotificationsAvailable(); + if (notificationState.IsUpdated()) { + lv_label_set_text_static(notificationIcon, NotificationIcon::GetIcon(notificationState.Get())); + } + currentDateTime = dateTimeController.CurrentDateTime(); if (currentDateTime.IsUpdated()) { |
