Shape the Folio app drawer

Let the shared drawer surface provide the background and stop\nthe Folio subpanels from painting their own opaque rectangles on\ntop of it.
This commit is contained in:
Marco Allegretti 2026-05-24 15:49:08 +02:00
parent ea564a0d4e
commit dd292f83fa
4 changed files with 38 additions and 10 deletions

View file

@ -36,13 +36,6 @@ Item {
// Convergence popup background // Convergence popup background
readonly property bool isPopup: ShellSettings.Settings.convergenceModeEnabled readonly property bool isPopup: ShellSettings.Settings.convergenceModeEnabled
Rectangle {
visible: root.isPopup
anchors.fill: parent
radius: 0
color: Kirigami.Theme.backgroundColor
}
// Keyboard navigation // Keyboard navigation
Keys.onPressed: (event) => { Keys.onPressed: (event) => {
if (event.key === Qt.Key_Escape || event.key === Qt.Key_Back) { if (event.key === Qt.Key_Escape || event.key === Qt.Key_Back) {

View file

@ -17,7 +17,7 @@ Rectangle {
// Emitted when the user taps a tile. // Emitted when the user taps a tile.
signal categorySelected(string categoryId) signal categorySelected(string categoryId)
color: Kirigami.Theme.backgroundColor color: "transparent"
radius: 0 radius: 0
// Swallow clicks so the dismiss area underneath is not triggered. // Swallow clicks so the dismiss area underneath is not triggered.

View file

@ -125,7 +125,7 @@ Item {
id: panelBackground id: panelBackground
anchors.fill: parent anchors.fill: parent
radius: 0 radius: 0
color: Kirigami.Theme.backgroundColor color: "transparent"
} }
MouseArea { MouseArea {

View file

@ -517,7 +517,7 @@ ContainmentItem {
y: overlayDrawer.y y: overlayDrawer.y
opacity: overlayDrawer.opacity opacity: overlayDrawer.opacity
radius: 0 radius: 0
color: Kirigami.Theme.backgroundColor color: "transparent"
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
@ -755,6 +755,41 @@ ContainmentItem {
onTaskActivated: folio.HomeScreenState.closeAppDrawer() onTaskActivated: folio.HomeScreenState.closeAppDrawer()
} }
Shape {
id: drawerSurface
x: overlayDrawer.x
y: overlayDrawer.y
width: bodyWidth + cornerRadius
height: overlayDrawer.popupHeight
opacity: overlayDrawer.opacity
visible: opacity > 0 && bodyWidth > 0 && height > 0
z: -1
preferredRendererType: Shape.CurveRenderer
asynchronous: true
enabled: false
readonly property real bodyWidth: Math.max(0, powerPanel.x + powerPanel.width - overlayDrawer.x)
readonly property real cornerRadius: Math.min(MobileShell.Constants.convergenceWorkspaceFrameRadius,
Math.max(0.01, Math.min(bodyWidth, height) / 2))
ShapePath {
id: drawerSurfacePath
readonly property real cornerRadius: drawerSurface.cornerRadius
fillColor: Kirigami.Theme.backgroundColor
strokeWidth: 0
startX: 0
startY: 0
PathLine { x: drawerSurface.bodyWidth + drawerSurfacePath.cornerRadius; y: 0 }
PathArc { x: drawerSurface.bodyWidth; y: drawerSurfacePath.cornerRadius; radiusX: drawerSurfacePath.cornerRadius; radiusY: drawerSurfacePath.cornerRadius; direction: PathArc.Counterclockwise }
PathLine { x: drawerSurface.bodyWidth; y: drawerSurface.height - drawerSurfacePath.cornerRadius }
PathArc { x: drawerSurface.bodyWidth + drawerSurfacePath.cornerRadius; y: drawerSurface.height; radiusX: drawerSurfacePath.cornerRadius; radiusY: drawerSurfacePath.cornerRadius; direction: PathArc.Counterclockwise }
PathLine { x: 0; y: drawerSurface.height }
PathLine { x: 0; y: 0 }
}
}
} }
// Game Center overlay full-screen grid of games shown when gaming mode // Game Center overlay full-screen grid of games shown when gaming mode