fix: column index desync after reorder

This commit is contained in:
2026-09-30 14:26:50 +02:00
parent 359f832609
commit 3373f11193
28 changed files with 859 additions and 464 deletions
+8 -8
View File
@@ -1,8 +1,8 @@
import QtQuick
import QtQuick.Layouts
import ZShell.Components
import ZShell.Services
import ZShell.Config
import qs.Helpers
import qs.Components
import qs.Services
@@ -14,7 +14,7 @@ CustomRect {
implicitWidth: 300
radius: Tokens.rounding.largeIncreased
Ref {
ServiceRef {
service: NetworkUsage
}
@@ -129,8 +129,8 @@ CustomRect {
CustomText {
color: Colors.palette.m3tertiary
text: {
const fmt = NetworkUsage.formatBytes(NetworkUsage.downloadSpeed ?? 0);
return fmt ? `${fmt.value.toFixed(1)} ${fmt.unit}` : "0.0 B/s";
const fmt = UsageFmt.formatBytes(NetworkUsage.downloadSpeed ?? 0);
return fmt ? `${fmt.value.toFixed(1)} ${fmt.unit}/s` : "0.0 B/s";
}
}
}
@@ -157,8 +157,8 @@ CustomRect {
CustomText {
color: Colors.palette.m3secondary
text: {
const fmt = NetworkUsage.formatBytes(NetworkUsage.uploadSpeed ?? 0);
return fmt ? `${fmt.value.toFixed(1)} ${fmt.unit}` : "0.0 B/s";
const fmt = UsageFmt.formatBytes(NetworkUsage.uploadSpeed ?? 0);
return fmt ? `${fmt.value.toFixed(1)} ${fmt.unit}/s` : "0.0 B/s";
}
}
}
@@ -185,8 +185,8 @@ CustomRect {
CustomText {
color: Colors.palette.m3onSurfaceVariant
text: {
const down = NetworkUsage.formatBytesTotal(NetworkUsage.downloadTotal ?? 0);
const up = NetworkUsage.formatBytesTotal(NetworkUsage.uploadTotal ?? 0);
const down = UsageFmt.formatBytes(NetworkUsage.downloadTotal ?? 0);
const up = UsageFmt.formatBytes(NetworkUsage.uploadTotal ?? 0);
return (down && up) ? `↓${down.value.toFixed(1)}${down.unit} ↑${up.value.toFixed(1)}${up.unit}` : "↓0.0B ↑0.0B";
}
}