Add new changes for the battery percentage inconsistency

This commit is contained in:
JoelVR2k 2025-11-14 10:58:10 -06:00 • committed by Hariharan Mudaliar
commit 4d12c3e18c

View file

@ -182,10 +182,17 @@ struct DynamicIslandBatteryView: View {
var body: some View { var body: some View {
HStack { HStack {
if Defaults[.showBatteryPercentage] { if Defaults[.showBatteryPercentage] {
Text("\(Int32(levelBattery))%") ZStack(alignment: .trailing) {
.font(.callout) Text("100%")
.foregroundStyle(.white) .font(.callout)
.frame(width: 40, alignment: .trailing) .hidden()
Text("\(Int32(levelBattery))%")
.font(.callout)
.foregroundStyle(.white)
.lineLimit(1)
}
.fixedSize(horizontal: true, vertical: false)
} }
BatteryView( BatteryView(
levelBattery: levelBattery, levelBattery: levelBattery,