Index: sources/gui/qml/components/NotificationBar.qml =================================================================== diff -u -re33e9c857923f9c0210a05c89cb9afd6e5490721 -r4cc6eda58284316d2245ec950a643d54520170c4 --- sources/gui/qml/components/NotificationBar.qml (.../NotificationBar.qml) (revision e33e9c857923f9c0210a05c89cb9afd6e5490721) +++ sources/gui/qml/components/NotificationBar.qml (.../NotificationBar.qml) (revision 4cc6eda58284316d2245ec950a643d54520170c4) @@ -30,14 +30,15 @@ property int muteTimeoutSec : 0 property color backgroundColor : Colors.textNotificationNoneBg - signal pressedNotificationBar() + signal clickedNotificationBar() function toggleSilence(silence, timeoutSec) { isSilenced = silence; muteTimeoutSec = !isSilenced ? 0 : timeoutSec; _bell.source = isSilenced ? "qrc:/images/bell-off.svg" : "qrc:/images/bell.svg" } + // Placeholder animation Timer { id: _timer interval: 1000; @@ -68,72 +69,68 @@ MouseArea { id: _TouchArea anchors.fill: parent; + onClicked: _root.clickedNotificationBar() + } - Image { - id: _icon - source: "qrc:/images/alarm.svg" - anchors.right: _text.left - anchors.rightMargin: Variables.notificationBarIconMargin; - anchors.verticalCenter: parent.verticalCenter; - sourceSize.height: Variables.notificationBarIconHeight; - sourceSize.width: Variables.notificationBarIconWidth; - } + Image { + id: _icon + source: "qrc:/images/alarm.svg" + anchors.right: _text.left + anchors.rightMargin: Variables.notificationBarIconMargin; + anchors.verticalCenter: parent.verticalCenter; + sourceSize.height: Variables.notificationBarIconHeight; + sourceSize.width: Variables.notificationBarIconWidth; + } - ColorOverlay { - id: _icon_overlay - anchors.fill: _icon; - source: _icon; - color: _root.backgroundColor; - cached: true; - antialiasing: true; - } + ColorOverlay { + id: _icon_overlay + anchors.fill: _icon; + source: _icon; + color: _root.backgroundColor; + cached: true; + antialiasing: true; + } - Text { id: _text - color : Colors.textNotificationNoneFg - anchors.centerIn : parent - font.pixelSize : Fonts.fontPixelNotification - horizontalAlignment : Text.AlignHCenter - verticalAlignment : Text.AlignVCenter - } + Text { id: _text + color : Colors.textNotificationNoneFg + anchors.centerIn : parent + font.pixelSize : Fonts.fontPixelNotification + horizontalAlignment : Text.AlignHCenter + verticalAlignment : Text.AlignVCenter + } - Image { - id: _bell - source: isSilenced ? "qrc:/images/bell-off.svg" : "qrc:/images/bell.svg" - anchors.left: _text.right - anchors.leftMargin: Variables.notificationBarIconMargin; - anchors.verticalCenter: parent.verticalCenter; - sourceSize.height: Variables.notificationBarIconHeight; - sourceSize.width: Variables.notificationBarIconWidth; - } + Image { + id: _bell + source: isSilenced ? "qrc:/images/bell-off.svg" : "qrc:/images/bell.svg" + anchors.left: _text.right + anchors.leftMargin: Variables.notificationBarIconMargin; + anchors.verticalCenter: parent.verticalCenter; + sourceSize.height: Variables.notificationBarIconHeight; + sourceSize.width: Variables.notificationBarIconWidth; + } - ColorOverlay { - id: _bell_overlay - anchors.fill: _bell; - source: _bell; - color: Colors.textMain; - cached: true; - antialiasing: true; - } + ColorOverlay { + id: _bell_overlay + anchors.fill: _bell; + source: _bell; + color: Colors.textMain; + cached: true; + antialiasing: true; + } - Text { id: _timeout_text - color : Colors.textMain; - anchors.left : _bell.right - anchors.leftMargin : Variables.notificationBarIconMargin; - anchors.verticalCenter: parent.verticalCenter; - font.pixelSize : Fonts.fontPixelNotification - horizontalAlignment : Text.AlignHCenter - verticalAlignment : Text.AlignVCenter - text: muteTimeoutSec; // will be 60 second or less (see PRS) - visible: isSilenced; - } - - - - onClicked: { - pressedNotificationBar(); - } + Text { id: _timeout_text + color : Colors.textMain; + anchors.left : _bell.right + anchors.leftMargin : Variables.notificationBarIconMargin; + anchors.verticalCenter: parent.verticalCenter; + font.pixelSize : Fonts.fontPixelNotification + horizontalAlignment : Text.AlignHCenter + verticalAlignment : Text.AlignVCenter + text: muteTimeoutSec; // will be 60 second or less (see PRS) + visible: isSilenced; } + onLevelChanged: { [_root.color, _text.color] = getRootTextFromAlarmLevel(level); }