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 {
|
||||
HStack {
|
||||
if Defaults[.showBatteryPercentage] {
|
||||
Text("\(Int32(levelBattery))%")
|
||||
.font(.callout)
|
||||
.foregroundStyle(.white)
|
||||
.frame(width: 40, alignment: .trailing)
|
||||
ZStack(alignment: .trailing) {
|
||||
Text("100%")
|
||||
.font(.callout)
|
||||
.hidden()
|
||||
|
||||
Text("\(Int32(levelBattery))%")
|
||||
.font(.callout)
|
||||
.foregroundStyle(.white)
|
||||
.lineLimit(1)
|
||||
}
|
||||
.fixedSize(horizontal: true, vertical: false)
|
||||
}
|
||||
BatteryView(
|
||||
levelBattery: levelBattery,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue