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:
46
shell.qml
46
shell.qml
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user