Initial commit of the Quickshell desktop suite: bar, dock, launcher, settings, Control Center, dashboard, OSD, lock screen, desktop widgets, plugin host with the vendored Noctalia/Omarchy compatibility layer, helpers, packaging, tests and phase documentation. Includes the optimization work so far: usage widgets and dashboard gauges no longer animate continuously, desktop widgets pause while covered, system controls stop flickering on background polls, dock app matching uses an indexed catalog, and workspace ghosts are created only for occupied slots. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
63 lines
2.1 KiB
QML
63 lines
2.1 KiB
QML
import QtQuick
|
|
import QtQuick.Controls
|
|
import "../theme"
|
|
|
|
// Thick pill slider with an icon inside the track (macOS Control Center style).
|
|
Slider {
|
|
id: root
|
|
property string glyph
|
|
property string fallback
|
|
implicitWidth: 220
|
|
implicitHeight: 28
|
|
padding: 0
|
|
background: Rectangle {
|
|
x: root.leftPadding
|
|
y: root.topPadding + root.availableHeight / 2 - height / 2
|
|
width: root.availableWidth
|
|
height: root.availableHeight
|
|
radius: height / 2
|
|
color: Theme.surfaceVariant
|
|
border.width: root.activeFocus ? 1 : 0
|
|
border.color: Theme.accent
|
|
Rectangle {
|
|
readonly property real knob: parent.height
|
|
width: Math.max(knob, knob + root.visualPosition * (parent.width - knob))
|
|
height: parent.height
|
|
radius: height / 2
|
|
color: root.enabled ? Qt.alpha(Theme.text, 0.92) : Qt.alpha(Theme.text, 0.35)
|
|
Behavior on width {
|
|
enabled: !root.pressed
|
|
NumberAnimation {
|
|
duration: Theme.duration / 2
|
|
easing.type: Easing.OutCubic
|
|
}
|
|
}
|
|
}
|
|
Text {
|
|
anchors.left: parent.left
|
|
anchors.leftMargin: (parent.height - width) / 2
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
text: Icons.available && root.glyph ? root.glyph : root.fallback
|
|
font.family: Icons.available && root.glyph ? Icons.family : ""
|
|
font.pixelSize: Math.round(parent.height * 0.5)
|
|
color: Theme.surface
|
|
}
|
|
}
|
|
handle: Rectangle {
|
|
x: root.leftPadding + root.visualPosition * (root.availableWidth - width)
|
|
y: root.topPadding + root.availableHeight / 2 - height / 2
|
|
width: root.availableHeight
|
|
height: root.availableHeight
|
|
radius: width / 2
|
|
color: root.enabled ? Theme.text : Qt.alpha(Theme.text, 0.5)
|
|
border.width: 1
|
|
border.color: Qt.alpha(Theme.surface, 0.5)
|
|
scale: root.pressed ? 1.06 : 1
|
|
Behavior on scale {
|
|
NumberAnimation {
|
|
duration: Theme.duration / 2
|
|
}
|
|
}
|
|
}
|
|
}
|