1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-25 22:12:50 -05:00

Always use power menu modal

This commit is contained in:
bbedward
2025-10-03 16:54:10 -04:00
parent 71eecd6e7b
commit 55d06a43f8
4 changed files with 15 additions and 118 deletions

View File

@@ -21,13 +21,11 @@ DankPopout {
id: root
property string expandedSection: ""
property bool powerOptionsExpanded: false
property var triggerScreen: null
property bool editMode: false
property int expandedWidgetIndex: -1
property var expandedWidgetData: null
signal powerActionRequested(string action, string title, string message)
signal lockRequested
function collapseAll() {
@@ -122,28 +120,22 @@ DankPopout {
HeaderPane {
id: headerPane
width: parent.width
powerOptionsExpanded: root.powerOptionsExpanded
editMode: root.editMode
onPowerOptionsExpandedChanged: root.powerOptionsExpanded = powerOptionsExpanded
onEditModeToggled: root.editMode = !root.editMode
onPowerActionRequested: (action, title, message) => root.powerActionRequested(action, title, message)
onPowerButtonClicked: {
if (powerMenuModalLoader) {
powerMenuModalLoader.active = true
if (powerMenuModalLoader.item) {
powerMenuModalLoader.item.open()
}
}
}
onLockRequested: {
root.close()
root.lockRequested()
}
}
PowerOptionsPane {
id: powerOptionsPane
width: parent.width
expanded: root.powerOptionsExpanded
onPowerActionRequested: (action, title, message) => {
root.powerOptionsExpanded = false
root.close()
root.powerActionRequested(action, title, message)
}
}
DragDropGrid {
id: widgetGrid
width: parent.width
@@ -226,4 +218,5 @@ DankPopout {
}
property var colorPickerModal: null
property var powerMenuModalLoader: null
}