diff --git a/components/mobileshell/qml/actiondrawer/ActionDrawerWindow.qml b/components/mobileshell/qml/actiondrawer/ActionDrawerWindow.qml index 4fef46da..c191e689 100644 --- a/components/mobileshell/qml/actiondrawer/ActionDrawerWindow.qml +++ b/components/mobileshell/qml/actiondrawer/ActionDrawerWindow.qml @@ -7,10 +7,11 @@ import QtQuick 2.15 import QtQuick.Controls 2.15 import QtQuick.Layouts 1.1 -import QtQuick.Window 2.2 +import QtQuick.Window import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.plasma.private.nanoshell 2.0 as NanoShell +import org.kde.layershell 1.0 as LayerShell /** * Window with the ActionDrawer component embedded in it. @@ -18,17 +19,21 @@ import org.kde.plasma.private.nanoshell 2.0 as NanoShell * Used for overlaying the ActionDrawer if the original window does not cover * the whole screen. */ -NanoShell.FullScreenOverlay { +Window { id: window + LayerShell.Window.scope: "overlay" + LayerShell.Window.anchors: LayerShell.Window.AnchorTop | LayerShell.Window.AnchorLeft | LayerShell.Window.AnchorRight | LayerShell.Window.AnchorBottom + LayerShell.Window.layer: LayerShell.Window.LayerOverlay + LayerShell.Window.exclusionZone: -1 + LayerShell.Window.keyboardInteractivity: LayerShell.Window.KeyboardInteractivityNone + /** * The ActionDrawer component. */ property alias actionDrawer: drawer visible: drawer.intendedToBeVisible - width: Screen.width - height: Screen.height color: "transparent" diff --git a/components/mobileshell/qml/actiondrawer/ContentContainer.qml b/components/mobileshell/qml/actiondrawer/ContentContainer.qml index fe0f0d92..a902c8b4 100644 --- a/components/mobileshell/qml/actiondrawer/ContentContainer.qml +++ b/components/mobileshell/qml/actiondrawer/ContentContainer.qml @@ -14,7 +14,7 @@ import org.kde.plasma.private.mobileshell.quicksettingsplugin as QS /** * Root element that contains all the ActionDrawer's contents, and is anchored to the screen. */ -Rectangle { +Item { id: root required property var actionDrawer @@ -31,12 +31,15 @@ Rectangle { Kirigami.Theme.inherit: false // Background color - color: Qt.rgba(Kirigami.Theme.backgroundColor.r, - Kirigami.Theme.backgroundColor.g, - Kirigami.Theme.backgroundColor.b, - (root.actionDrawer.mode == ActionDrawer.Portrait || notificationWidget.hasNotifications) ? 0.95 : 0.9) - Behavior on color { ColorAnimation { duration: Kirigami.Units.longDuration } } - opacity: Math.max(0, Math.min(1, actionDrawer.offset / root.minimizedQuickSettingsOffset)) + Rectangle { + anchors.fill: parent + color: Qt.rgba(Kirigami.Theme.backgroundColor.r, + Kirigami.Theme.backgroundColor.g, + Kirigami.Theme.backgroundColor.b, + (root.actionDrawer.mode == ActionDrawer.Portrait || notificationWidget.hasNotifications) ? 0.95 : 0.9) + Behavior on color { ColorAnimation { duration: Kirigami.Units.longDuration } } + opacity: Math.max(0, Math.min(1, actionDrawer.offset / root.minimizedQuickSettingsOffset)) + } // Layout that switches between landscape and portrait mode Loader {