Connect app drawer to workspace frame

This commit is contained in:
Marco Allegretti 2026-05-23 15:58:56 +02:00
parent afe97d41f8
commit 25d11acacd
4 changed files with 12 additions and 79 deletions

View file

@ -4,7 +4,6 @@
import QtQuick import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Controls as Controls import QtQuick.Controls as Controls
import Qt5Compat.GraphicalEffects
import org.kde.plasma.components 3.0 as PC3 import org.kde.plasma.components 3.0 as PC3
import org.kde.kirigami as Kirigami import org.kde.kirigami as Kirigami
@ -40,19 +39,8 @@ Item {
Rectangle { Rectangle {
visible: root.isPopup visible: root.isPopup
anchors.fill: parent anchors.fill: parent
radius: Kirigami.Units.cornerRadius radius: 0
color: Kirigami.Theme.backgroundColor color: Kirigami.Theme.backgroundColor
opacity: 0.95
layer.enabled: true
layer.effect: DropShadow {
transparentBorder: true
horizontalOffset: 0
verticalOffset: 2
radius: 12
samples: 25
color: Qt.rgba(0, 0, 0, 0.4)
}
} }
// Keyboard navigation // Keyboard navigation

View file

@ -18,7 +18,7 @@ Rectangle {
signal categorySelected(string categoryId) signal categorySelected(string categoryId)
color: Kirigami.Theme.backgroundColor color: Kirigami.Theme.backgroundColor
radius: Kirigami.Units.cornerRadius radius: 0
// Swallow clicks so the dismiss area underneath is not triggered. // Swallow clicks so the dismiss area underneath is not triggered.
MouseArea { anchors.fill: parent } MouseArea { anchors.fill: parent }

View file

@ -121,22 +121,11 @@ Item {
sortMode: root.sortByName ? TaskManager.TasksModel.SortAlpha : TaskManager.TasksModel.SortLastActivated sortMode: root.sortByName ? TaskManager.TasksModel.SortAlpha : TaskManager.TasksModel.SortLastActivated
} }
Rectangle {
id: panelShadow
anchors.fill: panelBackground
anchors.topMargin: 2
radius: panelBackground.radius
color: Qt.rgba(0, 0, 0, 0.35)
}
Rectangle { Rectangle {
id: panelBackground id: panelBackground
anchors.fill: parent anchors.fill: parent
radius: Kirigami.Units.cornerRadius radius: 0
color: Kirigami.Theme.backgroundColor color: Kirigami.Theme.backgroundColor
border.width: 1
border.pixelAligned: false
border.color: root.mixColor(Kirigami.Theme.backgroundColor, Kirigami.Theme.textColor, 0.14)
} }
MouseArea { MouseArea {

View file

@ -6,7 +6,6 @@ import QtQuick.Window
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Effects import QtQuick.Effects
import QtQuick.Shapes 1.8 import QtQuick.Shapes 1.8
import Qt5Compat.GraphicalEffects
import org.kde.kirigami as Kirigami import org.kde.kirigami as Kirigami
@ -437,9 +436,10 @@ ContainmentItem {
readonly property real popupWidth: Math.min(Kirigami.Units.gridUnit * 28, parent.width * 0.5) readonly property real popupWidth: Math.min(Kirigami.Units.gridUnit * 28, parent.width * 0.5)
readonly property real dockHeight: MobileShell.Constants.convergenceDockHeight readonly property real dockHeight: MobileShell.Constants.convergenceDockHeight
readonly property real sideInset: MobileShell.Constants.convergenceWorkspaceFrameThickness
readonly property real connectedPanelGap: 0
readonly property real popupTopY: MobileShell.Constants.topPanelHeight readonly property real popupTopY: MobileShell.Constants.topPanelHeight
+ MobileShell.Constants.convergenceWorkspaceFrameThickness + MobileShell.Constants.convergenceWorkspaceFrameThickness
+ Kirigami.Units.smallSpacing
readonly property real popupBottomY: parent.height readonly property real popupBottomY: parent.height
- dockHeight - dockHeight
- MobileShell.Constants.convergenceWorkspaceFrameThickness - MobileShell.Constants.convergenceWorkspaceFrameThickness
@ -453,7 +453,7 @@ ContainmentItem {
property real animationY: (1 - folio.HomeScreenState.appDrawerOpenProgress) * (Kirigami.Units.gridUnit * 2) property real animationY: (1 - folio.HomeScreenState.appDrawerOpenProgress) * (Kirigami.Units.gridUnit * 2)
x: Kirigami.Units.smallSpacing x: sideInset
y: (opacity > 0) y: (opacity > 0)
? popupTopY + animationY ? popupTopY + animationY
: parent.height : parent.height
@ -487,35 +487,13 @@ ContainmentItem {
} }
} }
// Drop shadow rendered separately so categoryPanel itself needs no
// layer FBO (which would rasterize and blur the icons inside).
Rectangle {
id: categoryPanelShadow
width: categoryPanel.width
height: categoryPanel.height
x: categoryPanel.x
y: categoryPanel.y
radius: categoryPanel.radius
color: categoryPanel.color
opacity: categoryPanel.opacity
layer.enabled: true
layer.effect: DropShadow {
transparentBorder: true
horizontalOffset: 0
verticalOffset: 2
radius: 12
samples: 25
color: Qt.rgba(0, 0, 0, 0.4)
}
}
CategoryPanel { CategoryPanel {
id: categoryPanel id: categoryPanel
folio: root.folio folio: root.folio
width: Kirigami.Units.gridUnit * 9 width: Kirigami.Units.gridUnit * 9
height: overlayDrawer.popupHeight height: overlayDrawer.popupHeight
x: overlayDrawer.x + overlayDrawer.width + Kirigami.Units.smallSpacing x: overlayDrawer.x + overlayDrawer.width + overlayDrawer.connectedPanelGap
y: overlayDrawer.y y: overlayDrawer.y
opacity: overlayDrawer.opacity opacity: overlayDrawer.opacity
@ -525,28 +503,6 @@ ContainmentItem {
} }
} }
// Drop shadow rendered separately so powerPanel itself needs no layer FBO,
// which would rasterize and blur the icons inside.
Rectangle {
id: powerPanelShadow
width: powerPanel.width
height: powerPanel.height
x: powerPanel.x
y: powerPanel.y
radius: powerPanel.radius
color: powerPanel.color
opacity: powerPanel.opacity
layer.enabled: true
layer.effect: DropShadow {
transparentBorder: true
horizontalOffset: 0
verticalOffset: 2
radius: 12
samples: 25
color: Qt.rgba(0, 0, 0, 0.4)
}
}
Rectangle { Rectangle {
id: powerPanel id: powerPanel
@ -556,11 +512,11 @@ ContainmentItem {
width: tileSize width: tileSize
height: overlayDrawer.popupHeight height: overlayDrawer.popupHeight
x: runningAppsPanel.visible x: runningAppsPanel.visible
? runningAppsPanel.x + runningAppsPanel.width + Kirigami.Units.smallSpacing ? runningAppsPanel.x + runningAppsPanel.width + overlayDrawer.connectedPanelGap
: categoryPanel.x + categoryPanel.width + Kirigami.Units.smallSpacing : categoryPanel.x + categoryPanel.width + overlayDrawer.connectedPanelGap
y: overlayDrawer.y y: overlayDrawer.y
opacity: overlayDrawer.opacity opacity: overlayDrawer.opacity
radius: Kirigami.Units.cornerRadius radius: 0
color: Kirigami.Theme.backgroundColor color: Kirigami.Theme.backgroundColor
MouseArea { MouseArea {
@ -790,9 +746,9 @@ ContainmentItem {
id: runningAppsPanel id: runningAppsPanel
folio: root.folio folio: root.folio
x: categoryPanel.x + categoryPanel.width + Kirigami.Units.smallSpacing x: categoryPanel.x + categoryPanel.width + overlayDrawer.connectedPanelGap
y: overlayDrawer.y y: overlayDrawer.y
width: Math.max(0, parent.width - x - powerPanel.width - Kirigami.Units.smallSpacing * 2) width: Math.max(0, parent.width - x - powerPanel.width - overlayDrawer.sideInset - overlayDrawer.connectedPanelGap)
height: overlayDrawer.popupHeight height: overlayDrawer.popupHeight
opacity: overlayDrawer.opacity opacity: overlayDrawer.opacity
visible: hasTasks && opacity > 0 visible: hasTasks && opacity > 0