diff --git a/Modules/Dock/DockMenu.qml b/Modules/Dock/DockMenu.qml index 7f18d6309..d118ef433 100644 --- a/Modules/Dock/DockMenu.qml +++ b/Modules/Dock/DockMenu.qml @@ -582,6 +582,7 @@ PopupWindow { Rectangle { anchors.fill: parent + anchors.margins: border.width color: Color.mSurfaceVariant radius: Style.radiusS border.color: Color.mOutline diff --git a/Modules/Panels/Settings/Tabs/About/VersionSubTab.qml b/Modules/Panels/Settings/Tabs/About/VersionSubTab.qml index efdfa03d3..c071277a9 100644 --- a/Modules/Panels/Settings/Tabs/About/VersionSubTab.qml +++ b/Modules/Panels/Settings/Tabs/About/VersionSubTab.qml @@ -33,7 +33,8 @@ ColumnLayout { property string commitInfo: "" readonly property bool isGitVersion: root.currentVersion.endsWith("-git") - readonly property int giga: (1024 * 1024 * 1024) + readonly property int gigaB: (1024 * 1024 * 1024) + readonly property int gigaD: (1000 * 1000 * 1000) // Update status: compare versions (strip -git suffix for comparison) readonly property string installedBase: root.currentVersion.replace("-git", "") @@ -96,7 +97,7 @@ ColumnLayout { version: UpdateService.currentVersion, compositor: TelemetryService.getCompositorType(), os: HostService.osPretty || "Unknown", - ramGb: Math.round((root.getModule("Memory")?.result?.total || 0) / root.giga), + ramGb: Math.round((root.getModule("Memory")?.result?.total || 0) / root.gigaB), monitors: monitors, ui: { scaleRatio: Settings.data.general.scaleRatio, @@ -140,7 +141,7 @@ ColumnLayout { info += "GPU: " + gpu.result.map(g => g.name || "Unknown").join(", ") + "\n"; } if (mem?.result) { - info += "Memory: " + SystemStatService.formatGigabytes(mem.result.total / root.giga) + "\n"; + info += "Memory: " + (mem.result.total / root.gigaB).toFixed(1) + " GB \n"; } if (wm?.result) { info += "WM: " + (wm.result.prettyName || wm.result.processName || "N/A") + "\n"; @@ -734,9 +735,9 @@ ColumnLayout { const mem = root.getModule("Memory"); if (!mem?.result) return "N/A"; - const used = SystemStatService.formatGigabytes(mem.result.used / root.giga); - const total = SystemStatService.formatGigabytes(mem.result.total / root.giga); - return used + " / " + total; + const used = (mem.result.used / root.gigaB).toFixed(1); + const total = (mem.result.total / root.gigaB).toFixed(1); + return used + " GB / " + total + " GB"; } color: Color.mOnSurface pointSize: sysInfo.textSize @@ -758,9 +759,9 @@ ColumnLayout { const rootDisk = disk.result.find(d => d.mountpoint === "/"); if (!rootDisk?.bytes) return "N/A"; - const used = SystemStatService.formatGigabytes(rootDisk.bytes.used / root.giga); - const total = SystemStatService.formatGigabytes(rootDisk.bytes.total / root.giga); - return used + " / " + total + " (" + rootDisk.filesystem + ")"; + const used = (rootDisk.bytes.used / root.gigaD).toFixed(1); + const total = (rootDisk.bytes.total / root.gigaD).toFixed(1); + return used + " GB / " + total + " GB" + " (" + rootDisk.filesystem + ")"; } color: Color.mOnSurface pointSize: sysInfo.textSize diff --git a/Modules/Tooltip/Tooltip.qml b/Modules/Tooltip/Tooltip.qml index 703fb6690..e0717ae8d 100644 --- a/Modules/Tooltip/Tooltip.qml +++ b/Modules/Tooltip/Tooltip.qml @@ -639,7 +639,7 @@ PopupWindow { Rectangle { anchors.fill: parent - anchors.margins: border.width / 2 + anchors.margins: border.width color: Color.mSurface border.color: Color.mOutline border.width: Style.borderS diff --git a/Services/System/SystemStatService.qml b/Services/System/SystemStatService.qml index a11c6290c..b0162de3e 100644 --- a/Services/System/SystemStatService.qml +++ b/Services/System/SystemStatService.qml @@ -501,7 +501,7 @@ Singleton { const newUsedGb = {}; const newSizeGb = {}; const newAvailableGb = {}; - const bytesPerGb = 1024 * 1024 * 1024; + const bytesPerGb = 1000 * 1000 * 1000; // Start from line 1 (skip header) for (var i = 1; i < lines.length; i++) { const parts = lines[i].trim().split(/\s+/);