mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-06-11 00:47:22 +00:00
Connect app drawer to workspace frame
This commit is contained in:
parent
afe97d41f8
commit
25d11acacd
4 changed files with 12 additions and 79 deletions
|
|
@ -4,7 +4,6 @@
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls as Controls
|
||||
import Qt5Compat.GraphicalEffects
|
||||
|
||||
import org.kde.plasma.components 3.0 as PC3
|
||||
import org.kde.kirigami as Kirigami
|
||||
|
|
@ -40,19 +39,8 @@ Item {
|
|||
Rectangle {
|
||||
visible: root.isPopup
|
||||
anchors.fill: parent
|
||||
radius: Kirigami.Units.cornerRadius
|
||||
radius: 0
|
||||
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
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ Rectangle {
|
|||
signal categorySelected(string categoryId)
|
||||
|
||||
color: Kirigami.Theme.backgroundColor
|
||||
radius: Kirigami.Units.cornerRadius
|
||||
radius: 0
|
||||
|
||||
// Swallow clicks so the dismiss area underneath is not triggered.
|
||||
MouseArea { anchors.fill: parent }
|
||||
|
|
|
|||
|
|
@ -121,22 +121,11 @@ Item {
|
|||
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 {
|
||||
id: panelBackground
|
||||
anchors.fill: parent
|
||||
radius: Kirigami.Units.cornerRadius
|
||||
radius: 0
|
||||
color: Kirigami.Theme.backgroundColor
|
||||
border.width: 1
|
||||
border.pixelAligned: false
|
||||
border.color: root.mixColor(Kirigami.Theme.backgroundColor, Kirigami.Theme.textColor, 0.14)
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import QtQuick.Window
|
|||
import QtQuick.Layouts
|
||||
import QtQuick.Effects
|
||||
import QtQuick.Shapes 1.8
|
||||
import Qt5Compat.GraphicalEffects
|
||||
|
||||
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 dockHeight: MobileShell.Constants.convergenceDockHeight
|
||||
readonly property real sideInset: MobileShell.Constants.convergenceWorkspaceFrameThickness
|
||||
readonly property real connectedPanelGap: 0
|
||||
readonly property real popupTopY: MobileShell.Constants.topPanelHeight
|
||||
+ MobileShell.Constants.convergenceWorkspaceFrameThickness
|
||||
+ Kirigami.Units.smallSpacing
|
||||
readonly property real popupBottomY: parent.height
|
||||
- dockHeight
|
||||
- MobileShell.Constants.convergenceWorkspaceFrameThickness
|
||||
|
|
@ -453,7 +453,7 @@ ContainmentItem {
|
|||
|
||||
property real animationY: (1 - folio.HomeScreenState.appDrawerOpenProgress) * (Kirigami.Units.gridUnit * 2)
|
||||
|
||||
x: Kirigami.Units.smallSpacing
|
||||
x: sideInset
|
||||
y: (opacity > 0)
|
||||
? popupTopY + animationY
|
||||
: 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 {
|
||||
id: categoryPanel
|
||||
folio: root.folio
|
||||
|
||||
width: Kirigami.Units.gridUnit * 9
|
||||
height: overlayDrawer.popupHeight
|
||||
x: overlayDrawer.x + overlayDrawer.width + Kirigami.Units.smallSpacing
|
||||
x: overlayDrawer.x + overlayDrawer.width + overlayDrawer.connectedPanelGap
|
||||
y: overlayDrawer.y
|
||||
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 {
|
||||
id: powerPanel
|
||||
|
||||
|
|
@ -556,11 +512,11 @@ ContainmentItem {
|
|||
width: tileSize
|
||||
height: overlayDrawer.popupHeight
|
||||
x: runningAppsPanel.visible
|
||||
? runningAppsPanel.x + runningAppsPanel.width + Kirigami.Units.smallSpacing
|
||||
: categoryPanel.x + categoryPanel.width + Kirigami.Units.smallSpacing
|
||||
? runningAppsPanel.x + runningAppsPanel.width + overlayDrawer.connectedPanelGap
|
||||
: categoryPanel.x + categoryPanel.width + overlayDrawer.connectedPanelGap
|
||||
y: overlayDrawer.y
|
||||
opacity: overlayDrawer.opacity
|
||||
radius: Kirigami.Units.cornerRadius
|
||||
radius: 0
|
||||
color: Kirigami.Theme.backgroundColor
|
||||
|
||||
MouseArea {
|
||||
|
|
@ -790,9 +746,9 @@ ContainmentItem {
|
|||
id: runningAppsPanel
|
||||
folio: root.folio
|
||||
|
||||
x: categoryPanel.x + categoryPanel.width + Kirigami.Units.smallSpacing
|
||||
x: categoryPanel.x + categoryPanel.width + overlayDrawer.connectedPanelGap
|
||||
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
|
||||
opacity: overlayDrawer.opacity
|
||||
visible: hasTasks && opacity > 0
|
||||
|
|
|
|||
Loading…
Reference in a new issue