aboutsummaryrefslogtreecommitdiff
path: root/modules/system/quickshell/SliderBox.qml
diff options
context:
space:
mode:
authorLeander Scherer <leander@schererleander.de>2026-05-18 21:48:24 +0200
committerLeander Scherer <leander@schererleander.de>2026-05-28 22:42:07 +0200
commit9a7cf1242d296dbdb9c03df48ab09054960295aa (patch)
treef1a2d5c77ef6bdb049c995afcc4c663c1ffd1373 /modules/system/quickshell/SliderBox.qml
parent3ef8b4973bcae26445f99467d50ad75730d204b5 (diff)
feat(quickshell): basic bar, tray, notification
Diffstat (limited to 'modules/system/quickshell/SliderBox.qml')
-rw-r--r--modules/system/quickshell/SliderBox.qml52
1 files changed, 52 insertions, 0 deletions
diff --git a/modules/system/quickshell/SliderBox.qml b/modules/system/quickshell/SliderBox.qml
new file mode 100644
index 0000000..59b994d
--- /dev/null
+++ b/modules/system/quickshell/SliderBox.qml
@@ -0,0 +1,52 @@
+import QtQuick
+import QtQuick.Layouts
+import Quickshell
+
+Squircle {
+ id: root
+ property string label: ""
+ property string icon: ""
+ property real value: 0
+ signal moved(real val)
+
+ Layout.fillWidth: true
+ height: 64
+ cornerRadius: 16
+ fillColor: hoverArea.containsMouse ? Theme.surfaceHover : Theme.surface
+
+ MouseArea {
+ id: hoverArea
+ anchors.fill: parent
+ hoverEnabled: true
+ acceptedButtons: Qt.NoButton
+ }
+
+ ColumnLayout {
+ anchors.fill: parent
+ anchors.margins: 12
+ spacing: 4
+
+ RowLayout {
+ Layout.fillWidth: true
+ Text {
+ text: root.label
+ color: Theme.textMuted
+ font {
+ family: Theme.mainFont
+ pixelSize: 12
+ weight: Font.DemiBold
+ }
+ Layout.leftMargin: 2
+ }
+ Item { Layout.fillWidth: true }
+ }
+
+ PillSlider {
+ id: slider
+ Layout.fillWidth: true
+ icon: root.icon
+ value: root.value
+ onMoved: root.moved(value)
+ }
+ }
+}