Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions panels/notification/center/NotifyStaging.qml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ FocusScope {
contentIcon: model.contentIcon
contentRowCount: model.contentRowCount

clearButton: SettingActionButton {
icon.name: "clean-alone"
onClicked: function () {
overlapNotify.removedCallback = function() {
overlapNotify.remove()
}
overlapNotify.state = "removing"
}
}

onRemove: function () {
console.log("remove overlap", model.id)
notifyModel.closeNotify(model.id, NotifyItem.Closed)
Expand Down
21 changes: 11 additions & 10 deletions panels/notification/center/OverlapNotify.qml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ NotifyItem {
readonly property int overlapItemRadius: 12
property bool enableDismissed: true
property var removedCallback
property Component clearButton: AnimationSettingButton {
icon.name: "clean-alone"
text: qsTr("Clean All")
onClicked: function () {
root.removedCallback = function() {
root.remove()
}
root.state = "removing"
}
}

signal expand()

Expand Down Expand Up @@ -64,16 +74,7 @@ NotifyItem {
contentIcon: root.contentIcon
contentRowCount: root.contentRowCount
enableDismissed: root.enableDismissed
clearButton: AnimationSettingButton {
icon.name: "clean-alone"
text: qsTr("Clean All")
onClicked: function () {
root.removedCallback = function() {
root.remove()
}
root.state = "removing"
}
}
clearButton: root.clearButton
onDismiss: function () {
root.removedCallback = function () {
root.dismiss()
Expand Down