Index: sources/gui/qml/components/NotificationBar.qml =================================================================== diff -u -r909090c5bae8b2fcc9aed6c2b55078b4f3d26fdd -rd4b88173e0d4a683a315d2fc57b8e1ec356b1232 --- sources/gui/qml/components/NotificationBar.qml (.../NotificationBar.qml) (revision 909090c5bae8b2fcc9aed6c2b55078b4f3d26fdd) +++ sources/gui/qml/components/NotificationBar.qml (.../NotificationBar.qml) (revision d4b88173e0d4a683a315d2fc57b8e1ec356b1232) @@ -22,8 +22,9 @@ Rectangle { id: _root objectName: "NotificationBar" - property alias text : _text.text - property int level : 0 + property alias text : _text.text; + property alias textColor : _text.color; + property int level : 0; visible : _text.text @@ -45,23 +46,6 @@ } onLevelChanged: { - switch (level) { - case GuiActions.ALARM_PRIORITY_HIGH: - _root.color = Colors.textNotificationHighBg; - _text.color = Colors.textNotificationHighFg; - break; - case GuiActions.ALARM_PRIORITY_MEDIUM: - _root.color = Colors.textNotificationMedBg; - _text.color = Colors.textNotificationMedFg; - break; - case GuiActions.ALARM_PRIORITY_LOW: - _root.color = Colors.textNotificationLowBg; - _text.color = Colors.textNotificationLowFg; - break; - default : // GuiActions.ALARM_PRIORITY_NONE - _root.color = Colors.textNotificationNoneBg; - _text.color = Colors.textNotificationNoneFg; - break; - } + [_root.color, _text.color] = getRootTextFromAlarmLevel(level); } }