feat: added module label to the macOS widgets

This commit is contained in:
Serhiy Mytrovtsiy
2024-07-30 19:46:14 +02:00
parent 2f3a19a589
commit d7cb4f5ddc
4 changed files with 18 additions and 6 deletions

View File

@@ -71,8 +71,11 @@ public struct GPUWidget: Widget {
if let anchor = chartProxy.plotFrame {
let frame = geometry[anchor]
Text("\(Int((value.utilization ?? 0)*100))%")
.font(.system(size: 16, weight: .regular))
.position(x: frame.midX, y: frame.midY)
.font(.system(size: 14, weight: .regular))
.position(x: frame.midX, y: frame.midY-5)
Text("GPU")
.font(.system(size: 8, weight: .semibold))
.position(x: frame.midX, y: frame.midY+8)
}
}
}