summaryrefslogtreecommitdiff
path: root/modules/controlcenter/Panes.qml
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-08-05 16:19:58 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-08-05 16:19:58 +1000
commitfb650907a0b18fab4f996c2fdc110d2d091e4060 (patch)
treeab2ec5bb7f17fc36ea9ccc12bad451c43a1b7f9c /modules/controlcenter/Panes.qml
parentinternal: position slider handle correctly (diff)
downloadcaelestia-shell-fb650907a0b18fab4f996c2fdc110d2d091e4060.tar.gz
caelestia-shell-fb650907a0b18fab4f996c2fdc110d2d091e4060.tar.bz2
caelestia-shell-fb650907a0b18fab4f996c2fdc110d2d091e4060.zip
internal: rename dcontent -> controlcenter
Diffstat (limited to 'modules/controlcenter/Panes.qml')
-rw-r--r--modules/controlcenter/Panes.qml98
1 files changed, 98 insertions, 0 deletions
diff --git a/modules/controlcenter/Panes.qml b/modules/controlcenter/Panes.qml
new file mode 100644
index 0000000..d1ec581
--- /dev/null
+++ b/modules/controlcenter/Panes.qml
@@ -0,0 +1,98 @@
+pragma ComponentBehavior: Bound
+
+import "bluetooth"
+import qs.components
+import qs.components.effects
+import qs.services
+import qs.config
+import Quickshell.Widgets
+import QtQuick
+import QtQuick.Layouts
+
+ClippingRectangle {
+ id: root
+
+ required property Session session
+
+ topRightRadius: Appearance.rounding.normal
+ bottomRightRadius: Appearance.rounding.normal
+ color: "transparent"
+
+ ColumnLayout {
+ id: layout
+
+ spacing: 0
+ y: -root.session.activeIndex * root.height
+
+ Pane {
+ index: 0
+ sourceComponent: Item {
+ StyledText {
+ anchors.centerIn: parent
+ text: qsTr("Work in progress")
+ color: Colours.palette.m3outline
+ font.pointSize: Appearance.font.size.extraLarge
+ font.weight: 500
+ }
+ }
+ }
+
+ Pane {
+ index: 1
+ sourceComponent: BtPane {
+ session: root.session
+ }
+ }
+
+ Pane {
+ index: 2
+ sourceComponent: Item {
+ StyledText {
+ anchors.centerIn: parent
+ text: qsTr("Work in progress")
+ color: Colours.palette.m3outline
+ font.pointSize: Appearance.font.size.extraLarge
+ font.weight: 500
+ }
+ }
+ }
+
+ Behavior on y {
+ NumberAnimation {
+ duration: Appearance.anim.durations.normal
+ easing.type: Easing.BezierSpline
+ easing.bezierCurve: Appearance.anim.curves.standard
+ }
+ }
+ }
+
+ InnerBorder {
+ leftThickness: 0
+ }
+
+ component Pane: Item {
+ id: pane
+
+ required property int index
+ property alias sourceComponent: loader.sourceComponent
+
+ implicitWidth: root.width
+ implicitHeight: root.height
+
+ Loader {
+ id: loader
+
+ anchors.fill: parent
+ clip: true
+ asynchronous: true
+ active: {
+ if (root.session.activeIndex === pane.index)
+ return true;
+
+ const ly = -layout.y;
+ const ty = pane.index * root.height;
+ return ly + root.height > ty && ly < ty + root.height;
+ }
+ }
+ }
+}