diff options
author | Grigorii Zimin <gzimin@luxoft.com> | 2020-03-03 19:26:10 +0300 |
---|---|---|
committer | Grigorii Zimin <gzimin@luxoft.com> | 2020-03-04 11:05:09 +0000 |
commit | 4593763d068fbde6f8f82d718fa9ecdcc7056680 (patch) | |
tree | 46ce6cab75e2e2affd71eb0c6d995254581a8b16 | |
parent | 17a05c081f6db560e5d0120323955937d8ce06b3 (diff) |
[notifications] animation on "close notification"
Change-Id: I0d89ffa51300869ad1699c12f3313288f038e63b
Reviewed-by: Egor Nemtsev <enemtsev@luxoft.com>
-rw-r--r-- | sysui/notification/NotificationCenter.qml | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sysui/notification/NotificationCenter.qml b/sysui/notification/NotificationCenter.qml index 21af195d..3be8d38b 100644 --- a/sysui/notification/NotificationCenter.qml +++ b/sysui/notification/NotificationCenter.qml @@ -258,8 +258,15 @@ Item { notificationSubtext: model.body notificationImage: model.image notificationActionText: model.actions.length > 0 ? model.actions[0].actionText : "" + Behavior on height { DefaultNumberAnimation { duration: 300 } } + Behavior on opacity { DefaultNumberAnimation { duration: 200 } } + onHeightChanged: { + if (height == 0) + root.notificationModel.removeNotification(model.id); + } onCloseClicked: { - root.notificationModel.removeNotification(model.id); + opacity = 0; + height = 0; } onButtonClicked: { root.notificationModel.buttonClicked(model.id); |