Compare commits
2 commits
03c545c9d1
...
427aeb438c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
427aeb438c | ||
|
|
2c5cf8c174 |
3 changed files with 14 additions and 3 deletions
|
|
@ -97,8 +97,8 @@ PanelWindow {
|
|||
Item {
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: 3
|
||||
anchors.leftMargin: Math.max(M.Theme.barPadding, M.Theme.screenRadius)
|
||||
anchors.rightMargin: Math.max(M.Theme.barPadding, M.Theme.screenRadius)
|
||||
anchors.leftMargin: 6
|
||||
anchors.rightMargin: 6
|
||||
|
||||
// ---- center (declared first so left/right can anchor to it) ----
|
||||
RowLayout {
|
||||
|
|
|
|||
|
|
@ -63,6 +63,14 @@ PanelWindow {
|
|||
_entered = true;
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: M.NotifService
|
||||
function onPopupExpiring(notifId) {
|
||||
if (notifId === popupItem.modelData.id)
|
||||
popupItem.animateDismiss(false);
|
||||
}
|
||||
}
|
||||
|
||||
Behavior on y {
|
||||
enabled: popupItem._entered
|
||||
NumberAnimation {
|
||||
|
|
|
|||
|
|
@ -105,12 +105,15 @@ QtObject {
|
|||
}
|
||||
}
|
||||
|
||||
// Signal popups to animate out before removal
|
||||
signal popupExpiring(var notifId)
|
||||
|
||||
property Component _expireTimer: Component {
|
||||
Timer {
|
||||
property var _notifId
|
||||
running: true
|
||||
onTriggered: {
|
||||
root.dismissPopup(_notifId);
|
||||
root.popupExpiring(_notifId);
|
||||
destroy();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue