1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-09 15:22:13 -04:00

feat: Docks refactor - Top/Bottom options

This commit is contained in:
purian23
2025-09-28 23:55:59 -04:00
parent a3e2563f9b
commit bd8976c620
7 changed files with 479 additions and 225 deletions

View File

@@ -46,26 +46,52 @@ ShellRoot {
anchors.fill: parent
}
Variants {
model: SettingsData.getFilteredScreens("dankBar")
Loader {
id: dankBarLoader
active: true
asynchronous: false
delegate: DankBar {
modelData: item
notepadVariants: notepadSlideoutVariants
property var currentPosition: SettingsData.dankBarAtBottom
sourceComponent: DankBar {
onColorPickerRequested: colorPickerModal.show()
}
onCurrentPositionChanged: {
console.log("DEBUG: DankBar position changed to:", currentPosition, "- recreating bar")
const comp = sourceComponent
sourceComponent = null
Qt.callLater(() => {
sourceComponent = comp
})
}
}
Variants {
model: SettingsData.getFilteredScreens("dock")
Loader {
id: dockLoader
active: true
asynchronous: false
delegate: Dock {
modelData: item
property var currentPosition: SettingsData.dockPosition
sourceComponent: Dock {
contextMenu: dockContextMenuLoader.item ? dockContextMenuLoader.item : null
Component.onCompleted: {
}
onLoaded: {
if (item) {
dockContextMenuLoader.active = true
}
}
onCurrentPositionChanged: {
console.log("DEBUG: Dock position changed to:", currentPosition, "- recreating dock")
const comp = sourceComponent
sourceComponent = null
Qt.callLater(() => {
sourceComponent = comp
})
}
}
Loader {