1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-28 23:42:51 -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

@@ -175,6 +175,12 @@ FloatingWindow {
width: parent.width
height: 48
MouseArea {
anchors.fill: parent
onPressed: windowControls.tryStartMove()
onDoubleClicked: windowControls.tryToggleMaximize()
}
Rectangle {
anchors.fill: parent
color: Theme.surfaceContainer
@@ -203,15 +209,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()
}
}
}
@@ -354,4 +373,9 @@ FloatingWindow {
}
}
}
FloatingWindowControls {
id: windowControls
targetWindow: root
}
}