feat: graphs now properly sized + port static graphs to c++

This commit is contained in:
2026-11-08 01:28:27 +01:00
parent a7767d2a80
commit d69a6bcafd
17 changed files with 1592 additions and 1257 deletions
+2 -7
View File
@@ -50,7 +50,6 @@ CustomRect {
SparklineItem {
id: sparkline
property bool initialized: false
property real smoothMax: targetMax * 1.6
property real targetMax: 1024
@@ -63,20 +62,15 @@ CustomRect {
line2Color: Colors.palette.m3tertiary
line2FillAlpha: 0.2
maxValue: smoothMax
slideInterval: Config.dashboard.resourceUpdateInterval
slideProgress: 1
Behavior on smoothMax {
enabled: sparkline.initialized
Anim {}
}
Component.onCompleted: {
sparkline.targetMax = Math.max(NetworkUsage.downloadBuffer.maximum, NetworkUsage.uploadBuffer.maximum, 1024);
sparkline.smoothMax = Qt.binding(() => sparkline.targetMax * 1.6);
sparkline.initialized = true;
}
Connections {
@@ -94,6 +88,7 @@ CustomRect {
duration: Config.dashboard.resourceUpdateInterval
easing.type: Easing.Linear
from: 0
loops: Animation.Infinite
property: "slideProgress"
target: sparkline
to: 1