feat: better notification storage and image caching + blobs
C++ / fmt (pull_request) Failing after 5s
C++ / build (pull_request) Failing after 11s
C++ / clang-tidy (pull_request) Failing after 10s
JS/TS / fmt (pull_request) Successful in 12s
JS/TS / lint (pull_request) Successful in 10s
Python / static (pull_request) Failing after 27s
Rust / build (pull_request) Successful in 54s
Python / verify (pull_request) Failing after 1m26s
Rust / fmt (pull_request) Successful in 46s
Rust / clippy (pull_request) Successful in 1m6s

This commit is contained in:
2026-11-02 19:00:43 +01:00
parent 789305286a
commit 11e7aac195
56 changed files with 5003 additions and 2168 deletions
+44 -10
View File
@@ -2,6 +2,7 @@ pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Shapes
import ZShell
import ZShell.Components
import ZShell.Config
import qs.Services
@@ -9,21 +10,50 @@ import qs.Services
Item {
id: root
readonly property real arcRadius: (size - padding - strokeWidth * (1 + waveAmplitude * 2)) / 2
// Ring geometry, quantized in the item's own device pixel space and never
// against its position: the parent layout places the item on the device
// grid, so these values cannot change when the item moves (no jitter), and
// the ring stays crisp wherever it lands.
// Device-pixel center of the ring: an even stroke width wants a pixel
// boundary, an odd one a pixel center. Floored, matching
// WavyLineRenderer::snapCenterDev, so the wave and this background arc
// always land on the same center even when the box's device size is odd.
readonly property real centerDev: Math.floor(
sizeDev / 2 - strokeParity / 2
) + strokeParity / 2
readonly property real centerX: centerDev / dpr
readonly property real centerY: centerDev / dpr
// Whole device pixels, and one pixel of slack on the outer edge: the ring's
// antialias feather needs somewhere to fade, otherwise it is cut flat at
// the top/left/right/bottom of the item rect.
readonly property real arcRadius: Math.max(
1,
Math.floor(
(sizeDev - Math.round(padding * dpr) - strokeDev * (1 + waveAmplitude * 2) - 2) / 2
)
) / dpr
property color bgColor: Colors.palette.m3secondaryContainer
property real clampedVal: Math.max(1 / 360, Math.min(1, isNaN(value) ? 0 : value))
readonly property real dotAngleRad: (startAngle + sweepAngle - gapAngle * (sweepAngle < 360 ? 0 : 1)) * Math.PI / 180
readonly property real dpr: ZUtils.dprFor(root)
property color fgColor: Colors.palette.m3primary
readonly property real gapAngle: ((spacing + strokeWidth) / (arcRadius || 1)) * (180 / Math.PI)
readonly property real gapAngle: ((spacing + strokeLogical) / (arcRadius || 1)) * (180 / Math.PI)
property alias hasEndIndicator: dot.active
property real implicitSize
property int padding: 0
readonly property real size: Math.min(width, height)
// The item's own size in whole device pixels. Never adjusted upwards: the
// texture is exactly this wide, so ring values derived from it cannot spill
// past the item's bounds.
readonly property real size: sizeDev / dpr
readonly property real sizeDev: Math.round(Math.min(width, height) * dpr)
property int spacing: Tokens.spacing.small
readonly property real strokeDev: Math.max(1, Math.round(strokeWidth * dpr))
readonly property real strokeLogical: strokeDev / dpr
readonly property real strokeParity: strokeDev % 2
property int startAngle: -90
property int strokeWidth: Tokens.padding.extraSmall
property int sweepAngle: 360
readonly property real thickness: strokeWidth * (1 + waveAmplitude) * 2
readonly property real thickness: strokeLogical * (1 + waveAmplitude) * 2
property real value
property alias waveAmplitude: wave.amplitudeMultiplier
property alias waveDuration: waveProgAnim.duration
@@ -43,7 +73,7 @@ Item {
capStyle: ShapePath.RoundCap
fillColor: "transparent"
strokeColor: root.bgColor
strokeWidth: Math.min(1, remainingArc.sweepAngle) * root.strokeWidth
strokeWidth: Math.max(1, Math.round(Math.min(1, remainingArc.sweepAngle) * root.strokeDev)) / root.dpr
Behavior on strokeColor {
CAnim {
@@ -53,8 +83,8 @@ Item {
PathAngleArc {
id: remainingArc
centerX: root.size / 2
centerY: root.size / 2
centerX: root.centerX
centerY: root.centerY
radiusX: root.arcRadius
radiusY: root.arcRadius
startAngle: root.startAngle + root.clampedVal * root.sweepAngle + root.gapAngle
@@ -68,11 +98,12 @@ Item {
amplitudeMultiplier: root.wavy ? 0.5 : 0
anchors.fill: parent
anchors.margins: -lineWidth * amplitudeMultiplier
anchors.margins: -Math.round(lineWidth * amplitudeMultiplier * root.dpr) / root.dpr
color: root.fgColor
frequency: 8
fullAngle: root.sweepAngle
lineWidth: root.strokeWidth
objectName: "wave"
pathType: WavyLine.Arc
radius: root.arcRadius
startAngle: root.startAngle
@@ -103,8 +134,11 @@ Item {
Loader {
id: dot
x: root.size / 2 + root.arcRadius * Math.cos(root.dotAngleRad) - width / 2
y: root.size / 2 + root.arcRadius * Math.sin(root.dotAngleRad) - height / 2
// Rounded in local device pixels: the dot's own size is a whole even
// device count, so an integral local position puts its center on the grid
// whatever the ring's angle, and moving the gauge moves the dot with it.
x: Math.round((root.centerX + root.arcRadius * Math.cos(root.dotAngleRad) - width / 2) * root.dpr) / root.dpr
y: Math.round((root.centerY + root.arcRadius * Math.sin(root.dotAngleRad) - height / 2) * root.dpr) / root.dpr
sourceComponent: CustomRect {
color: root.fgColor