Dock: fix dock ui when switching positions

This commit is contained in:
Ly-sec
2026-01-10 15:02:24 +01:00
parent c58abd7566
commit 45f91f17a7
2 changed files with 840 additions and 671 deletions
+824 -671
View File
File diff suppressed because it is too large Load Diff
+16
View File
@@ -346,6 +346,22 @@ Loader {
}
}
// Force dock reload when orientation changes to fix anchor/layout issues
property bool _orientationReloading: false
onIsVerticalChanged: {
if (!autoHide && dockLoaded) {
_orientationReloading = true;
// Brief unload/reload cycle to reset layout
Qt.callLater(() => {
dockLoaded = false;
Qt.callLater(() => {
dockLoaded = true;
_orientationReloading = false;
});
});
}
}
Loader {
id: dockWindowLoader
active: Settings.data.dock.enabled && (barIsReady || !hasBar) && modelData && (Settings.data.dock.monitors.length === 0 || Settings.data.dock.monitors.includes(modelData.name)) && dockLoaded && ToplevelManager && (dockApps.length > 0)