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

dwl/mangowc: add layout switcher and viewer widget

This commit is contained in:
bbedward
2025-11-13 12:44:56 -05:00
parent cf75c1aad0
commit 5d2f5557e5
17 changed files with 1291 additions and 229 deletions

View File

@@ -427,6 +427,9 @@ Item {
}, {
"loader": batteryPopoutLoader,
"prop": "shouldBeVisible"
}, {
"loader": layoutPopoutLoader,
"prop": "shouldBeVisible"
}, {
"loader": vpnPopoutLoader,
"prop": "shouldBeVisible"
@@ -839,6 +842,7 @@ Item {
"gpuTemp": gpuTempComponent,
"notificationButton": notificationButtonComponent,
"battery": batteryComponent,
"layout": layoutComponent,
"controlCenterButton": controlCenterButtonComponent,
"idleInhibitor": idleInhibitorComponent,
"spacer": spacerComponent,
@@ -878,6 +882,7 @@ Item {
"gpuTempComponent": gpuTempComponent,
"notificationButtonComponent": notificationButtonComponent,
"batteryComponent": batteryComponent,
"layoutComponent": layoutComponent,
"controlCenterButtonComponent": controlCenterButtonComponent,
"idleInhibitorComponent": idleInhibitorComponent,
"spacerComponent": spacerComponent,
@@ -1342,6 +1347,27 @@ Item {
}
}
Component {
id: layoutComponent
DWLLayout {
layoutPopupVisible: layoutPopoutLoader.item ? layoutPopoutLoader.item.shouldBeVisible : false
widgetThickness: barWindow.widgetThickness
barThickness: barWindow.effectiveBarThickness
axis: barWindow.axis
section: topBarContent.getWidgetSection(parent) || "center"
popoutTarget: {
layoutPopoutLoader.active = true
return layoutPopoutLoader.item
}
parentScreen: barWindow.screen
onToggleLayoutPopup: {
layoutPopoutLoader.active = true
layoutPopoutLoader.item?.toggle()
}
}
}
Component {
id: vpnComponent