summaryrefslogtreecommitdiff
path: root/modules/detachedcontent/DetachedContent.qml
diff options
context:
space:
mode:
Diffstat (limited to 'modules/detachedcontent/DetachedContent.qml')
-rw-r--r--modules/detachedcontent/DetachedContent.qml53
1 files changed, 13 insertions, 40 deletions
diff --git a/modules/detachedcontent/DetachedContent.qml b/modules/detachedcontent/DetachedContent.qml
index ab4b4ef..c77a7da 100644
--- a/modules/detachedcontent/DetachedContent.qml
+++ b/modules/detachedcontent/DetachedContent.qml
@@ -6,7 +6,6 @@ import qs.config
import Quickshell
import QtQuick
import QtQuick.Layouts
-import QtQuick.Effects
Item {
id: root
@@ -33,6 +32,17 @@ Item {
implicitWidth: navRail.implicitWidth
color: Colours.palette.m3surfaceContainer
+ CustomMouseArea {
+ anchors.fill: parent
+
+ function onWheel(event: WheelEvent): void {
+ if (event.angleDelta.y < 0)
+ root.session.activeIndex = Math.min(root.session.activeIndex + 1, root.session.panes.length - 1);
+ else if (event.angleDelta.y > 0)
+ root.session.activeIndex = Math.max(root.session.activeIndex - 1, 0);
+ }
+ }
+
NavRail {
id: navRail
@@ -40,48 +50,11 @@ Item {
}
}
- Item {
+ Panes {
Layout.fillWidth: true
Layout.fillHeight: true
- StyledText {
- anchors.centerIn: parent
- text: qsTr("Work in progress")
- color: Colours.palette.m3outline
- font.pointSize: Appearance.font.size.extraLarge
- font.weight: 500
- }
-
- StyledRect {
- anchors.fill: parent
- color: Colours.palette.m3surfaceContainer
- topRightRadius: Appearance.rounding.normal
- bottomRightRadius: Appearance.rounding.normal
-
- layer.enabled: true
- layer.effect: MultiEffect {
- maskSource: mask
- maskEnabled: true
- maskInverted: true
- maskThresholdMin: 0.5
- maskSpreadAtMin: 1
- }
- }
-
- Item {
- id: mask
-
- anchors.fill: parent
- layer.enabled: true
- visible: false
-
- Rectangle {
- anchors.fill: parent
- anchors.margins: Appearance.padding.normal
- anchors.leftMargin: 0
- radius: Appearance.rounding.small
- }
- }
+ session: root.session
}
}
}