Index: sources/gui/qml/components/NotificationBarSmall.qml =================================================================== diff -u -r44a85c96ab55e424866ec4cca0270aa218355f82 -r0e528e5f706308c7b0e8f22a4d9dbb5b5715db7c --- sources/gui/qml/components/NotificationBarSmall.qml (.../NotificationBarSmall.qml) (revision 44a85c96ab55e424866ec4cca0270aa218355f82) +++ sources/gui/qml/components/NotificationBarSmall.qml (.../NotificationBarSmall.qml) (revision 0e528e5f706308c7b0e8f22a4d9dbb5b5715db7c) @@ -1,16 +1,16 @@ /*! - * + * * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. * \copyright * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. - * + * * \file NotificationBarSmall.qml * \author (last) Peter Lucia * \date (last) 25-Jun-2020 * \author (original) Peter Lucia * \date (original) 25-Jun-2020 - * + * */ // Qt @@ -26,6 +26,8 @@ property alias imageSource : _image.source property bool imageAutoSize : false + property bool imageAnimated : false + property alias text : _text.text property alias textColor : _text.color property alias textfontSize : _text.font.pixelSize @@ -49,9 +51,11 @@ anchors.centerIn: parent spacing: 10 Image { id: _image - anchors.verticalCenter: parent.verticalCenter - width : imageAutoSize ? Math.min(_root.height, _root.width) : Variables.notificationIconSize - height: imageAutoSize ? Math.min(_root.height, _root.width) : Variables.notificationIconSize + width : source == "" ? 0 : imageAutoSize ? Math.min(_root.height, _root.width) : Variables.notificationIconSize + height: source == "" ? 0 : imageAutoSize ? Math.min(_root.height, _root.width) : Variables.notificationIconSize + anchors.verticalCenter : imageAutoSize ? parent.verticalCenter : undefined + anchors.top : imageAutoSize ? undefined : parent.top + anchors.topMargin : height > _root.height ? -((height - _root.height) / 2) : 0 } Text { id: _text color : Colors.textNotificationNoneFg @@ -61,6 +65,19 @@ } } + OpacityAnimator { target: _image + from : 0.3 + to : 1 + duration : 1500 + running : imageAnimated && _root.visible + onFinished : { + var tmp = from + from = to + to = tmp + restart() + } + } + onLevelChanged: { switch (level) { case GuiActions.ALARM_PRIORITY_HIGH: