mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
Add new changes for the battery percentage inconsistency
This commit is contained in:
parent
631383e4cb
commit
4d12c3e18c
1 changed files with 11 additions and 4 deletions
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue