summaryrefslogtreecommitdiff
path: root/src/displayapp
diff options
context:
space:
mode:
authorRiku Isokoski <riksu9000@gmail.com>2022-08-08 18:01:40 +0300
committerGitHub <noreply@github.com>2022-08-08 18:01:40 +0300
commit8e72cf380fa0bec62e3d9805ec777e586d188cf2 (patch)
treee17230633afd491d30057f0640fe6bcb8b78e58d /src/displayapp
parentb768829c633dd8fa344b744382d7d75c71c4229f (diff)
Notification swap text colors for visibility and reduce duplication (#1252)
Diffstat (limited to 'src/displayapp')
-rw-r--r--src/displayapp/screens/Notifications.cpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/displayapp/screens/Notifications.cpp b/src/displayapp/screens/Notifications.cpp
index 1479cf5d..768ac290 100644
--- a/src/displayapp/screens/Notifications.cpp
+++ b/src/displayapp/screens/Notifications.cpp
@@ -272,7 +272,7 @@ Notifications::NotificationItem::NotificationItem(const char* title,
lv_obj_align(alert_count, NULL, LV_ALIGN_IN_TOP_RIGHT, 0, 16);
lv_obj_t* alert_type = lv_label_create(container, nullptr);
- lv_obj_set_style_local_text_color(alert_type, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_MAKE(0xb0, 0xb0, 0xb0));
+ lv_obj_set_style_local_text_color(alert_type, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_MAKE(0xff, 0xb0, 0x0));
if (title == nullptr) {
lv_label_set_text_static(alert_type, "Notification");
} else {
@@ -289,21 +289,16 @@ Notifications::NotificationItem::NotificationItem(const char* title,
lv_obj_set_width(alert_type, 180);
lv_obj_align(alert_type, NULL, LV_ALIGN_IN_TOP_LEFT, 0, 16);
- /////////
+ lv_obj_t* alert_subject = lv_label_create(subject_container, nullptr);
+ lv_label_set_long_mode(alert_subject, LV_LABEL_LONG_BREAK);
+ lv_obj_set_width(alert_subject, LV_HOR_RES - 20);
+
switch (category) {
- default: {
- lv_obj_t* alert_subject = lv_label_create(subject_container, nullptr);
- lv_obj_set_style_local_text_color(alert_subject, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_MAKE(0xff, 0xb0, 0x0));
- lv_label_set_long_mode(alert_subject, LV_LABEL_LONG_BREAK);
- lv_obj_set_width(alert_subject, LV_HOR_RES - 20);
+ default:
lv_label_set_text(alert_subject, msg);
- } break;
+ break;
case Controllers::NotificationManager::Categories::IncomingCall: {
lv_obj_set_height(subject_container, 108);
- lv_obj_t* alert_subject = lv_label_create(subject_container, nullptr);
- lv_obj_set_style_local_text_color(alert_subject, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_MAKE(0xff, 0xb0, 0x0));
- 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_static(alert_subject, "Incoming call from");
lv_obj_t* alert_caller = lv_label_create(subject_container, nullptr);