mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-13 04:51:21 +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))
|
||||
if viewModel.showResults || status.account.id == currentAccount.account?.id {
|
||||
Spacer()
|
||||
Text("\(percentForOption(option: option))%")
|
||||
.font(.scaledSubheadline)
|
||||
.frame(width: 40)
|
||||
// Make sure they're all the same width using a ZStack with 100% hiding behind the
|
||||
// real percentage.
|
||||
ZStack(alignment: .trailing) {
|
||||
Text("100%")
|
||||
.hidden()
|
||||
|
||||
Text("\(percentForOption(option: option))%")
|
||||
.font(.scaledSubheadline)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue