mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
Add close button to dock thumbnail preview popup
This commit is contained in:
parent
213de171fb
commit
ca6170c1f5
1 changed files with 26 additions and 0 deletions
|
|
@ -596,6 +596,32 @@ MouseArea {
|
||||||
visible: !thumbPipeWireLoader.item
|
visible: !thumbPipeWireLoader.item
|
||||||
|| !thumbPipeWireLoader.item.hasThumbnail
|
|| !thumbPipeWireLoader.item.hasThumbnail
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: closeButton
|
||||||
|
width: Kirigami.Units.iconSizes.small
|
||||||
|
height: width
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.margins: Kirigami.Units.smallSpacing
|
||||||
|
z: 1
|
||||||
|
visible: thumbEntry.containsMouse
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
var idx = thumbnailPopup.isGroup
|
||||||
|
? tasksModel.makeModelIndex(thumbnailPopup.taskIndex, index)
|
||||||
|
: tasksModel.makeModelIndex(thumbnailPopup.taskIndex)
|
||||||
|
tasksModel.requestClose(idx)
|
||||||
|
if (thumbnailPopup.windowIds.length <= 1) {
|
||||||
|
thumbnailPopup.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Kirigami.Icon {
|
||||||
|
anchors.fill: parent
|
||||||
|
source: "window-close"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PC3.Label {
|
PC3.Label {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue