diff --git a/Modules/MainScreen/MainScreens.qml b/Modules/MainScreen/AllScreens.qml similarity index 100% rename from Modules/MainScreen/MainScreens.qml rename to Modules/MainScreen/AllScreens.qml diff --git a/Modules/MainScreen/MainScreen.qml b/Modules/MainScreen/MainScreen.qml index 78cf25e4..5a59cbfc 100644 --- a/Modules/MainScreen/MainScreen.qml +++ b/Modules/MainScreen/MainScreen.qml @@ -79,6 +79,8 @@ PanelWindow { // Desktop dimming when panels are open property bool dimDesktop: Settings.data.general.dimDesktop property bool isPanelOpen: (PanelService.openedPanel !== null) && (PanelService.openedPanel.screen === screen) + property bool isPanelClosing: (PanelService.openedPanel !== null) && PanelService.openedPanel.isClosing + color: { if (dimDesktop && isPanelOpen) { return Qt.alpha(Color.mShadow, 0.8) @@ -124,30 +126,8 @@ PanelWindow { id: backgroundMaskRegion x: 0 y: 0 - width: root.isPanelOpen ? root.width : 0 - height: root.isPanelOpen ? root.height : 0 - intersection: Intersection.Subtract - } - } - - // Variants for panel regions - Variants { - id: panelRegions - - // Model is the list of open panels (filters out closed ones) - model: [audioPanel, controlCenterPanel, calendarPanel].filter(function (p) { - return p && p.isPanelOpen - }) - - Region { - required property var modelData - property var panelBg: modelData.panelRegion - - // Direct bindings - x: panelBg?.x ?? 0 - y: panelBg?.y ?? 0 - width: panelBg?.width ?? 0 - height: panelBg?.height ?? 0 + width: root.isPanelOpen && !isPanelClosing ? root.width : 0 + height: root.isPanelOpen && !isPanelClosing ? root.height : 0 intersection: Intersection.Subtract } } diff --git a/shell.qml b/shell.qml index 3f433162..8217e7e6 100644 --- a/shell.qml +++ b/shell.qml @@ -101,7 +101,7 @@ ShellRoot { IPCService {} // MainScreen for each screen (manages bar + all panels) - MainScreens {} + AllScreens {} } }