summaryrefslogtreecommitdiff
path: root/modules/controlcenter/dev/DevControlCenter.qml
diff options
context:
space:
mode:
authorATMDA <atdma2600@gmail.com>2025-11-13 16:56:49 -0500
committerATMDA <atdma2600@gmail.com>2025-11-13 16:56:49 -0500
commitbaa10d6ccfe8ad03a8832c4a43179c21020997ab (patch)
treeba74b57591ccc83e5311e4cb89b3d75f8f27e4c4 /modules/controlcenter/dev/DevControlCenter.qml
parentcontrolcenter: wireless debug removal (preparing for rewrite) (diff)
downloadcaelestia-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/DevControlCenter.qml')
-rw-r--r--modules/controlcenter/dev/DevControlCenter.qml94
1 files changed, 94 insertions, 0 deletions
diff --git a/modules/controlcenter/dev/DevControlCenter.qml b/modules/controlcenter/dev/DevControlCenter.qml
new file mode 100644
index 0000000..29592ca
--- /dev/null
+++ b/modules/controlcenter/dev/DevControlCenter.qml
@@ -0,0 +1,94 @@
+pragma ComponentBehavior: Bound
+
+import "."
+import ".."
+import qs.components
+import qs.components.controls
+import qs.services
+import qs.config
+import Quickshell
+import QtQuick
+import QtQuick.Layouts
+
+Item {
+ id: root
+
+ required property ShellScreen screen
+ readonly property int rounding: floating ? 0 : Appearance.rounding.normal
+
+ property alias floating: session.floating
+ property alias active: session.active
+ property alias navExpanded: session.navExpanded
+
+ readonly property DevSession session: DevSession {
+ id: session
+
+ root: root
+ }
+
+ function close(): void {
+ }
+
+ implicitWidth: implicitHeight * Config.controlCenter.sizes.ratio
+ implicitHeight: screen.height * Config.controlCenter.sizes.heightMult
+
+ GridLayout {
+ anchors.fill: parent
+
+ rowSpacing: 0
+ columnSpacing: 0
+ rows: root.floating ? 2 : 1
+ columns: 2
+
+ Loader {
+ Layout.fillWidth: true
+ Layout.columnSpan: 2
+
+ asynchronous: true
+ active: root.floating
+ visible: active
+
+ sourceComponent: DevWindowTitle {
+ screen: root.screen
+ session: root.session
+ }
+ }
+
+ StyledRect {
+ Layout.fillHeight: true
+
+ topLeftRadius: root.rounding
+ bottomLeftRadius: root.rounding
+ implicitWidth: navRail.implicitWidth
+ color: Colours.tPalette.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);
+ }
+ }
+
+ DevNavRail {
+ id: navRail
+
+ screen: root.screen
+ session: root.session
+ }
+ }
+
+ DevPanes {
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+
+ topRightRadius: root.rounding
+ bottomRightRadius: root.rounding
+ session: root.session
+ }
+ }
+}
+