diff options
| author | ATMDA <atdma2600@gmail.com> | 2025-11-13 16:56:49 -0500 |
|---|---|---|
| committer | ATMDA <atdma2600@gmail.com> | 2025-11-13 16:56:49 -0500 |
| commit | baa10d6ccfe8ad03a8832c4a43179c21020997ab (patch) | |
| tree | ba74b57591ccc83e5311e4cb89b3d75f8f27e4c4 /modules/controlcenter/dev/DevPanes.qml | |
| parent | controlcenter: wireless debug removal (preparing for rewrite) (diff) | |
| download | caelestia-shell-baa10d6ccfe8ad03a8832c4a43179c21020997ab.tar.gz caelestia-shell-baa10d6ccfe8ad03a8832c4a43179c21020997ab.tar.bz2 caelestia-shell-baa10d6ccfe8ad03a8832c4a43179c21020997ab.zip | |
controlcenter: created dev panel for wireless testing
Diffstat (limited to 'modules/controlcenter/dev/DevPanes.qml')
| -rw-r--r-- | modules/controlcenter/dev/DevPanes.qml | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/modules/controlcenter/dev/DevPanes.qml b/modules/controlcenter/dev/DevPanes.qml new file mode 100644 index 0000000..6b5ce06 --- /dev/null +++ b/modules/controlcenter/dev/DevPanes.qml @@ -0,0 +1,70 @@ +pragma ComponentBehavior: Bound + +import "." +import ".." +import qs.components +import qs.services +import qs.config +import Quickshell.Widgets +import QtQuick +import QtQuick.Layouts + +ClippingRectangle { + id: root + + required property DevSession session + + color: "transparent" + + ColumnLayout { + id: layout + + spacing: 0 + y: -root.session.activeIndex * root.height + + Pane { + index: 0 + sourceComponent: DevWirelessPane { + session: root.session + } + } + + Pane { + index: 1 + sourceComponent: DevDebugPane { + session: root.session + } + } + + Behavior on y { + Anim {} + } + } + + 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; + } + } + } +} + |