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

@@ -107,6 +107,15 @@ FloatingWindow {
event.accepted = true;
}
MouseArea {
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
height: headerRow.height + Theme.spacingM
onPressed: windowControls.tryStartMove()
onDoubleClicked: windowControls.tryToggleMaximize()
}
Row {
id: headerRow
anchors.left: parent.left
@@ -117,7 +126,7 @@ FloatingWindow {
anchors.topMargin: Theme.spacingM
Column {
width: parent.width - 40
width: parent.width - 60
spacing: Theme.spacingXS
StyledText {
@@ -151,13 +160,25 @@ FloatingWindow {
}
}
DankActionButton {
iconName: "close"
iconSize: Theme.iconSize - 4
iconColor: Theme.surfaceText
enabled: !isLoading
opacity: enabled ? 1 : 0.5
onClicked: cancelAuth()
Row {
spacing: Theme.spacingXS
DankActionButton {
visible: windowControls.supported
iconName: root.maximized ? "fullscreen_exit" : "fullscreen"
iconSize: Theme.iconSize - 4
iconColor: Theme.surfaceText
onClicked: windowControls.tryToggleMaximize()
}
DankActionButton {
iconName: "close"
iconSize: Theme.iconSize - 4
iconColor: Theme.surfaceText
enabled: !isLoading
opacity: enabled ? 1 : 0.5
onClicked: cancelAuth()
}
}
}
@@ -314,4 +335,9 @@ FloatingWindow {
}
}
}
FloatingWindowControls {
id: windowControls
targetWindow: root
}
}