mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-04-27 10:24:44 +00:00
Fix poll percentage wrapping with larger font sizes (#1182)
This commit is contained in:
parent
b0ee77caed
commit
796f451f3a
1 changed files with 9 additions and 3 deletions
|
@ -77,9 +77,15 @@ public struct StatusPollView: View {
|
||||||
.disabled(viewModel.poll.expired || (viewModel.poll.voted ?? false))
|
.disabled(viewModel.poll.expired || (viewModel.poll.voted ?? false))
|
||||||
if viewModel.showResults || status.account.id == currentAccount.account?.id {
|
if viewModel.showResults || status.account.id == currentAccount.account?.id {
|
||||||
Spacer()
|
Spacer()
|
||||||
Text("\(percentForOption(option: option))%")
|
// Make sure they're all the same width using a ZStack with 100% hiding behind the
|
||||||
.font(.scaledSubheadline)
|
// real percentage.
|
||||||
.frame(width: 40)
|
ZStack(alignment: .trailing) {
|
||||||
|
Text("100%")
|
||||||
|
.hidden()
|
||||||
|
|
||||||
|
Text("\(percentForOption(option: option))%")
|
||||||
|
.font(.scaledSubheadline)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue