summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/Notifications.cpp
diff options
context:
space:
mode:
authorKieran Cawthray <kieranc@gmail.com>2021-05-18 17:45:16 +0200
committerKieran Cawthray <kieranc@gmail.com>2021-05-18 17:45:16 +0200
commit6a925292722be365f4efc288c64b023639f0c201 (patch)
tree0d60937546c41844ead44375d6fbee7e6cb3ea0b /src/displayapp/screens/Notifications.cpp
parenta4968b502990f4a9e848c5240be2ee73348dd38e (diff)
Revert "Reset"
This reverts commit 378fa6b4016b65e2d7b128fdc3ce89c4ca779a4d.
Diffstat (limited to 'src/displayapp/screens/Notifications.cpp')
-rw-r--r--src/displayapp/screens/Notifications.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/displayapp/screens/Notifications.cpp b/src/displayapp/screens/Notifications.cpp
index f0fd2f66..1f113750 100644
--- a/src/displayapp/screens/Notifications.cpp
+++ b/src/displayapp/screens/Notifications.cpp
@@ -176,7 +176,17 @@ Notifications::NotificationItem::NotificationItem(const char* title,
lv_obj_set_style_local_text_color(alert_type, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x888888));
if (title == nullptr)
title = "Notification";
+ char* pchar;
+ pchar = strchr(title, '\n');
+ while (pchar != nullptr) {
+ *pchar = ' ';
+ pchar =
+ pchar = strchr(pchar + 1, '\n');
+ }
lv_label_set_text(alert_type, title);
+ lv_label_set_long_mode(alert_type, LV_LABEL_LONG_SROLL_CIRC);
+ lv_label_set_anim_speed(alert_type, 3);
+ lv_obj_set_width(alert_type, 180);
lv_obj_align(alert_type, NULL, LV_ALIGN_IN_TOP_LEFT, 0, 16);
/////////