mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-29 07:52:50 -05:00
window: add support for startSystemMove, resize, maximize to floating
windows
This commit is contained in:
@@ -114,12 +114,12 @@ FloatingWindow {
|
||||
var themeId = PopoutService.pendingThemeInstall;
|
||||
PopoutService.pendingThemeInstall = "";
|
||||
urlInstallConfirm.showWithOptions({
|
||||
title: I18n.tr("Install Theme", "theme installation dialog title"),
|
||||
message: I18n.tr("Install theme '%1' from the DMS registry?", "theme installation confirmation").arg(themeId),
|
||||
confirmText: I18n.tr("Install", "install action button"),
|
||||
cancelText: I18n.tr("Cancel"),
|
||||
onConfirm: () => installTheme(themeId, themeId, true),
|
||||
onCancel: () => hide()
|
||||
"title": I18n.tr("Install Theme", "theme installation dialog title"),
|
||||
"message": I18n.tr("Install theme '%1' from the DMS registry?", "theme installation confirmation").arg(themeId),
|
||||
"confirmText": I18n.tr("Install", "install action button"),
|
||||
"cancelText": I18n.tr("Cancel"),
|
||||
"onConfirm": () => installTheme(themeId, themeId, true),
|
||||
"onCancel": () => hide()
|
||||
});
|
||||
}
|
||||
|
||||
@@ -222,6 +222,12 @@ FloatingWindow {
|
||||
anchors.top: parent.top
|
||||
height: Math.max(headerIcon.height, headerText.height, refreshButton.height, closeButton.height)
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onPressed: windowControls.tryStartMove()
|
||||
onDoubleClicked: windowControls.tryToggleMaximize()
|
||||
}
|
||||
|
||||
DankIcon {
|
||||
id: headerIcon
|
||||
name: "palette"
|
||||
@@ -256,6 +262,14 @@ FloatingWindow {
|
||||
onClicked: root.refreshThemes()
|
||||
}
|
||||
|
||||
DankActionButton {
|
||||
visible: windowControls.supported
|
||||
iconName: root.maximized ? "fullscreen_exit" : "fullscreen"
|
||||
iconSize: Theme.iconSize - 2
|
||||
iconColor: Theme.outline
|
||||
onClicked: windowControls.tryToggleMaximize()
|
||||
}
|
||||
|
||||
DankActionButton {
|
||||
id: closeButton
|
||||
iconName: "close"
|
||||
@@ -569,4 +583,9 @@ FloatingWindow {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FloatingWindowControls {
|
||||
id: windowControls
|
||||
targetWindow: root
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user