mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
fix: fixed different percentage rounding in the Disk popup and widget (#2560)
This commit is contained in:
@@ -70,7 +70,7 @@ public struct DiskWidget: Widget {
|
||||
GeometryReader { geometry in
|
||||
if let anchor = chartProxy.plotFrame {
|
||||
let frame = geometry[anchor]
|
||||
Text("\(Int((100*(value.size-value.free))/value.size))%")
|
||||
Text("\(Int(value.percentage.rounded(toPlaces: 2) * 100))%")
|
||||
.font(.system(size: 16, weight: .regular))
|
||||
.position(x: frame.midX, y: frame.midY-5)
|
||||
Text("Disk")
|
||||
|
||||
Reference in New Issue
Block a user