1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-28 15:32:50 -05:00

window: add support for startSystemMove, resize, maximize to floating

windows
This commit is contained in:
bbedward
2025-12-22 13:18:37 -05:00
parent c703cb6504
commit 4982ea53dd
12 changed files with 578 additions and 230 deletions

View File

@@ -1,4 +1,4 @@
pragma ComponentBehavior: Bound
pragma ComponentBehavior
import QtQuick
import Quickshell
@@ -189,6 +189,12 @@ FloatingWindow {
width: parent.width
height: 48
MouseArea {
anchors.fill: parent
onPressed: windowControls.tryStartMove()
onDoubleClicked: windowControls.tryToggleMaximize()
}
Rectangle {
anchors.fill: parent
color: Theme.withAlpha(Theme.surfaceContainer, 0.5)
@@ -216,15 +222,28 @@ FloatingWindow {
}
}
DankActionButton {
circular: false
iconName: "close"
iconSize: Theme.iconSize - 4
iconColor: Theme.surfaceText
Row {
anchors.right: parent.right
anchors.rightMargin: Theme.spacingM
anchors.verticalCenter: parent.verticalCenter
onClicked: root.hide()
spacing: Theme.spacingXS
DankActionButton {
visible: windowControls.supported
circular: false
iconName: root.maximized ? "fullscreen_exit" : "fullscreen"
iconSize: Theme.iconSize - 4
iconColor: Theme.surfaceText
onClicked: windowControls.tryToggleMaximize()
}
DankActionButton {
circular: false
iconName: "close"
iconSize: Theme.iconSize - 4
iconColor: Theme.surfaceText
onClicked: root.hide()
}
}
}
@@ -414,4 +433,9 @@ FloatingWindow {
}
}
}
FloatingWindowControls {
id: windowControls
targetWindow: root
}
}