From 68a7016080115dd7a7eae1041eb2a75457aae0cd Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Sun, 20 Mar 2022 16:47:25 +0200 Subject: Replace lv_label_set_text where possible --- src/displayapp/screens/Notifications.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/displayapp/screens/Notifications.cpp') diff --git a/src/displayapp/screens/Notifications.cpp b/src/displayapp/screens/Notifications.cpp index f9afd8c7..600f7488 100644 --- a/src/displayapp/screens/Notifications.cpp +++ b/src/displayapp/screens/Notifications.cpp @@ -229,7 +229,7 @@ Notifications::NotificationItem::NotificationItem(const char* title, lv_obj_set_style_local_text_color(alert_subject, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_ORANGE); lv_label_set_long_mode(alert_subject, LV_LABEL_LONG_BREAK); lv_obj_set_width(alert_subject, LV_HOR_RES - 20); - lv_label_set_text(alert_subject, "Incoming call from"); + lv_label_set_text_static(alert_subject, "Incoming call from"); lv_obj_t* alert_caller = lv_label_create(container1, nullptr); lv_obj_align(alert_caller, alert_subject, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 0); @@ -243,7 +243,7 @@ Notifications::NotificationItem::NotificationItem(const char* title, lv_obj_set_size(bt_accept, 76, 76); lv_obj_align(bt_accept, NULL, LV_ALIGN_IN_BOTTOM_LEFT, 0, 0); label_accept = lv_label_create(bt_accept, nullptr); - lv_label_set_text(label_accept, Symbols::phone); + lv_label_set_text_static(label_accept, Symbols::phone); lv_obj_set_style_local_bg_color(bt_accept, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_GREEN); bt_reject = lv_btn_create(lv_scr_act(), nullptr); @@ -252,7 +252,7 @@ Notifications::NotificationItem::NotificationItem(const char* title, lv_obj_set_size(bt_reject, 76, 76); lv_obj_align(bt_reject, NULL, LV_ALIGN_IN_BOTTOM_MID, 0, 0); label_reject = lv_label_create(bt_reject, nullptr); - lv_label_set_text(label_reject, Symbols::phoneSlash); + lv_label_set_text_static(label_reject, Symbols::phoneSlash); lv_obj_set_style_local_bg_color(bt_reject, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_RED); bt_mute = lv_btn_create(lv_scr_act(), nullptr); @@ -261,7 +261,7 @@ Notifications::NotificationItem::NotificationItem(const char* title, lv_obj_set_size(bt_mute, 76, 76); lv_obj_align(bt_mute, NULL, LV_ALIGN_IN_BOTTOM_RIGHT, 0, 0); label_mute = lv_label_create(bt_mute, nullptr); - lv_label_set_text(label_mute, Symbols::volumMute); + lv_label_set_text_static(label_mute, Symbols::volumMute); lv_obj_set_style_local_bg_color(bt_mute, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_GRAY); } break; } @@ -270,7 +270,7 @@ Notifications::NotificationItem::NotificationItem(const char* title, lv_label_set_long_mode(backgroundLabel, LV_LABEL_LONG_CROP); lv_obj_set_size(backgroundLabel, 240, 240); lv_obj_set_pos(backgroundLabel, 0, 0); - lv_label_set_text(backgroundLabel, ""); + lv_label_set_text_static(backgroundLabel, ""); } void Notifications::NotificationItem::OnCallButtonEvent(lv_obj_t* obj, lv_event_t event) { -- cgit v1.2.3