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>
29 lines
1.0 KiB
QML
29 lines
1.0 KiB
QML
import QtQuick
|
|
import qs.compat.noctalia.Commons
|
|
import qs.compat.noctalia.Services.UI
|
|
|
|
Rectangle {
|
|
id: root
|
|
|
|
// Mandatory properties for gauges
|
|
required property int orientation // Qt.Vertical || Qt.Horizontal
|
|
required property real ratio // 0..1
|
|
|
|
radius: orientation === Qt.Vertical ? width / 2 : height / 2
|
|
color: Color.mOutline
|
|
property color fillColor: Color.mPrimary
|
|
|
|
// Fill that grows from bottom if vertical and left if horizontal.
|
|
// Snap to zero if the computed pixel length is sub-pixel (< 1px).
|
|
Rectangle {
|
|
readonly property real clampedRatio: Math.min(1, Math.max(0, root.ratio))
|
|
readonly property real rawFill: (orientation === Qt.Vertical ? root.height : root.width) * clampedRatio
|
|
width: orientation === Qt.Vertical ? root.width : (rawFill < 1 ? 0 : rawFill)
|
|
height: orientation === Qt.Vertical ? (rawFill < 1 ? 0 : rawFill) : root.height
|
|
radius: root.radius
|
|
color: root.fillColor
|
|
anchors.bottom: orientation === Qt.Vertical ? parent.bottom : undefined
|
|
anchors.left: parent.left
|
|
}
|
|
}
|