diff --git a/components/mobileshell/qml/actiondrawer/private/LandscapeContentContainer.qml b/components/mobileshell/qml/actiondrawer/private/LandscapeContentContainer.qml index 3817c54b..3eeb3920 100644 --- a/components/mobileshell/qml/actiondrawer/private/LandscapeContentContainer.qml +++ b/components/mobileshell/qml/actiondrawer/private/LandscapeContentContainer.qml @@ -4,6 +4,7 @@ import QtQuick import QtQuick.Controls as QQC2 import QtQuick.Layouts +import QtQuick.Shapes 1.8 import QtQuick.Window import org.kde.kirigami as Kirigami @@ -29,7 +30,7 @@ Item { readonly property real maximizedQuickSettingsOffset: height readonly property bool isConvergence: ShellSettings.Settings.convergenceModeEnabled readonly property real convergenceFrameThickness: MobileShell.Constants.convergenceWorkspaceFrameThickness - readonly property real convergenceSurfaceTopInset: MobileShell.Constants.topPanelHeight + readonly property real convergenceSurfaceTopInset: MobileShell.Constants.topPanelHeight + convergenceFrameThickness readonly property real convergenceSurfaceBottomInset: MobileShell.Constants.convergenceDockHeight + convergenceFrameThickness readonly property real convergenceSurfaceSideInset: 0 readonly property real convergenceSurfaceWidth: Math.max(0, width - convergenceSurfaceSideInset * 2) @@ -48,9 +49,48 @@ Item { // dismiss drawer when background is clicked onClicked: root.actionDrawer.close(); + Shape { + id: actionDrawerSurface + x: quickSettingsPanel.x - cornerRadius + y: quickSettingsPanel.y + width: bodyWidth + cornerRadius + height: quickSettingsPanel.height + opacity: root.isConvergence ? quickSettingsPanel.opacity * root.brightnessPressedValue : 0 + visible: opacity > 0 && bodyWidth > 0 && height > 0 + z: 0 + preferredRendererType: Shape.CurveRenderer + asynchronous: true + enabled: false + + readonly property real bodyWidth: quickSettingsPanel.width + readonly property real cornerRadius: Math.min(MobileShell.Constants.convergenceWorkspaceFrameRadius, + Math.max(0.01, Math.min(bodyWidth, height) / 2)) + + Kirigami.Theme.inherit: false + Kirigami.Theme.colorSet: Kirigami.Theme.Window + + ShapePath { + id: actionDrawerSurfacePath + readonly property real cornerRadius: actionDrawerSurface.cornerRadius + + fillColor: Kirigami.Theme.backgroundColor + strokeWidth: 0 + startX: actionDrawerSurface.width + startY: 0 + + PathLine { x: 0; y: 0 } + PathArc { x: actionDrawerSurfacePath.cornerRadius; y: actionDrawerSurfacePath.cornerRadius; radiusX: actionDrawerSurfacePath.cornerRadius; radiusY: actionDrawerSurfacePath.cornerRadius; direction: PathArc.Clockwise } + PathLine { x: actionDrawerSurfacePath.cornerRadius; y: actionDrawerSurface.height - actionDrawerSurfacePath.cornerRadius } + PathArc { x: 0; y: actionDrawerSurface.height; radiusX: actionDrawerSurfacePath.cornerRadius; radiusY: actionDrawerSurfacePath.cornerRadius; direction: PathArc.Clockwise } + PathLine { x: actionDrawerSurface.width; y: actionDrawerSurface.height } + PathLine { x: actionDrawerSurface.width; y: 0 } + } + } + // right sidebar MobileShell.QuickSettingsPanel { id: quickSettingsPanel + z: 1 height: Math.min(quickSettingsPanel.contentImplicitHeight + quickSettingsPanel.topPadding + quickSettingsPanel.bottomPadding, quickSettingsPanel.availableHeight) width: Math.min(intendedWidth, quickSettingsPanel.availableWidth) diff --git a/components/mobileshell/qml/actiondrawer/private/QuickSettingsPanel.qml b/components/mobileshell/qml/actiondrawer/private/QuickSettingsPanel.qml index 528baea7..aa61111f 100644 --- a/components/mobileshell/qml/actiondrawer/private/QuickSettingsPanel.qml +++ b/components/mobileshell/qml/actiondrawer/private/QuickSettingsPanel.qml @@ -51,6 +51,7 @@ MobileShell.BaseItem { background: MobileShell.PanelBackground { anchors.fill: parent anchors.margins: root.isConvergence ? 0 : Kirigami.Units.largeSpacing + visible: !root.isConvergence panelType: root.isConvergence ? MobileShell.PanelBackground.PanelType.Flat : MobileShell.PanelBackground.PanelType.Base radius: root.isConvergence ? 0 : Kirigami.Units.cornerRadius opacity: brightnessPressedValue