diff options
| author | Leander Scherer <leander@schererleander.de> | 2026-05-18 21:48:24 +0200 |
|---|---|---|
| committer | Leander Scherer <leander@schererleander.de> | 2026-05-28 22:42:07 +0200 |
| commit | 9a7cf1242d296dbdb9c03df48ab09054960295aa (patch) | |
| tree | f1a2d5c77ef6bdb049c995afcc4c663c1ffd1373 /modules/system/quickshell/ThinSlider.qml | |
| parent | 3ef8b4973bcae26445f99467d50ad75730d204b5 (diff) | |
feat(quickshell): basic bar, tray, notification
Diffstat (limited to 'modules/system/quickshell/ThinSlider.qml')
| -rw-r--r-- | modules/system/quickshell/ThinSlider.qml | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/modules/system/quickshell/ThinSlider.qml b/modules/system/quickshell/ThinSlider.qml new file mode 100644 index 0000000..61a9ce8 --- /dev/null +++ b/modules/system/quickshell/ThinSlider.qml @@ -0,0 +1,40 @@ +import QtQuick +import QtQuick.Controls + +Slider { + id: root + + readonly property color colorTrack: Theme.sliderTrack + readonly property color colorProgress: Theme.accent + readonly property color colorHandle: Theme.sliderHandle + + implicitHeight: 14 + padding: 0 + + background: Rectangle { + x: root.leftPadding + y: root.topPadding + root.availableHeight / 2 - height / 2 + implicitWidth: 200 + implicitHeight: 2 + width: root.availableWidth + height: implicitHeight + radius: height / 2 + color: root.colorTrack + + Rectangle { + width: root.handle.x + (root.handle.width / 2) + height: parent.height + color: root.colorProgress + radius: height / 2 + } + } + + handle: Rectangle { + x: root.leftPadding + root.visualPosition * (root.availableWidth - width) + y: root.topPadding + root.availableHeight / 2 - height / 2 + implicitWidth: 2 + implicitHeight: 10 + radius: width / 2 + color: root.colorHandle + } +} |
