diff options
| author | Riku Isokoski <riksu9000@gmail.com> | 2022-03-20 14:47:25 (GMT) |
|---|---|---|
| committer | Riku Isokoski <riksu9000@gmail.com> | 2022-04-18 16:47:42 (GMT) |
| commit | 68a7016080115dd7a7eae1041eb2a75457aae0cd (patch) | |
| tree | a1011cafa0bd0b538119331fc7e092b4d716ac03 /src/displayapp/screens/WatchFaceAnalog.cpp | |
| parent | ff73f67d6f0ac6dde480aa82b0c225377ce60d49 (diff) | |
Replace lv_label_set_text where possible
Diffstat (limited to 'src/displayapp/screens/WatchFaceAnalog.cpp')
| -rw-r--r-- | src/displayapp/screens/WatchFaceAnalog.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/displayapp/screens/WatchFaceAnalog.cpp b/src/displayapp/screens/WatchFaceAnalog.cpp index 6104281..4cfc969 100644 --- a/src/displayapp/screens/WatchFaceAnalog.cpp +++ b/src/displayapp/screens/WatchFaceAnalog.cpp @@ -67,13 +67,13 @@ WatchFaceAnalog::WatchFaceAnalog(Pinetime::Applications::DisplayApp* app, lv_obj_align(bg_clock_img, NULL, LV_ALIGN_CENTER, 0, 0); batteryIcon = lv_label_create(lv_scr_act(), nullptr); - lv_label_set_text(batteryIcon, Symbols::batteryHalf); + lv_label_set_text_static(batteryIcon, Symbols::batteryHalf); lv_obj_align(batteryIcon, NULL, LV_ALIGN_IN_TOP_RIGHT, 0, 0); lv_obj_set_auto_realign(batteryIcon, true); notificationIcon = lv_label_create(lv_scr_act(), NULL); lv_obj_set_style_local_text_color(notificationIcon, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x00FF00)); - lv_label_set_text(notificationIcon, NotificationIcon::GetIcon(false)); + lv_label_set_text_static(notificationIcon, NotificationIcon::GetIcon(false)); lv_obj_align(notificationIcon, NULL, LV_ALIGN_IN_TOP_LEFT, 0, 0); // Date - Day / Week day @@ -185,7 +185,7 @@ void WatchFaceAnalog::SetBatteryIcon() { } else { lv_obj_set_style_local_text_color(batteryIcon, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_WHITE); } - lv_label_set_text(batteryIcon, BatteryIcon::GetBatteryIcon(batteryPercent)); + lv_label_set_text_static(batteryIcon, BatteryIcon::GetBatteryIcon(batteryPercent)); } void WatchFaceAnalog::Refresh() { @@ -193,7 +193,7 @@ void WatchFaceAnalog::Refresh() { if (isCharging.IsUpdated()) { if (isCharging.Get()) { lv_obj_set_style_local_text_color(batteryIcon, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_RED); - lv_label_set_text(batteryIcon, Symbols::plug); + lv_label_set_text_static(batteryIcon, Symbols::plug); } else { SetBatteryIcon(); } @@ -208,7 +208,7 @@ void WatchFaceAnalog::Refresh() { notificationState = notificationManager.AreNewNotificationsAvailable(); if (notificationState.IsUpdated()) { - lv_label_set_text(notificationIcon, NotificationIcon::GetIcon(notificationState.Get())); + lv_label_set_text_static(notificationIcon, NotificationIcon::GetIcon(notificationState.Get())); } currentDateTime = dateTimeController.CurrentDateTime(); |
