Files
mxandClaude Opus 5.5 99e64a7713 Add glassMxrph shell sources
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>
2026-10-07 22:36:17 +02:00

58 lines
1.6 KiB
QML

import QtQuick
import "../theme"
import "../services"
Item {
id: root
property string label
property var value
implicitWidth: 100
implicitHeight: 106
Canvas {
id: ring
anchors.horizontalCenter: parent.horizontalCenter
width: 82
height: 82
property color accent: Theme.accent
property color track: Theme.border
property var reading: root.value
onAccentChanged: requestPaint()
onTrackChanged: requestPaint()
onReadingChanged: requestPaint()
onPaint: {
const c = getContext("2d");
c.reset();
c.lineWidth = 6;
c.lineCap = "round";
c.strokeStyle = track;
c.beginPath();
c.arc(41, 41, 35, 0, Math.PI * 2);
c.stroke();
if (!MetricsService.stale && reading !== null && reading !== undefined) {
c.strokeStyle = accent;
c.beginPath();
c.arc(41, 41, 35, -Math.PI / 2, -Math.PI / 2 + Math.PI * 2 * Math.max(0, Math.min(100, reading)) / 100);
c.stroke();
}
}
Connections {
target: MetricsService
function onStaleChanged() {
ring.requestPaint();
}
}
Text {
anchors.centerIn: parent
text: MetricsService.value(root.value, "%")
color: Theme.text
font.pixelSize: 18
}
}
Text {
anchors.bottom: parent.bottom
anchors.horizontalCenter: parent.horizontalCenter
text: root.label
color: Theme.textSecondary
}
}