fix huge numbers turning into ... in top roll up header

This commit is contained in:
Trey t
2022-02-10 11:29:22 -06:00
parent 92514a5e33
commit 4b4e69d752

View File

@@ -58,13 +58,20 @@ struct SmallRollUpHeaderView: View {
private var circularViews: some View {
HStack {
ForEach(entries, id: \.0) { (mood, value) in
Text(String(value))
.font(.title)
.fontWeight(.bold)
.frame(maxWidth: .infinity)
.padding()
.background(Circle().fill(mood.color))
.foregroundColor(Color(UIColor.white))
ZStack {
Circle().fill(mood.color)
.frame(width: 50, height: 50)
Text(String(value))
.font(.title)
.fontWeight(.bold)
.frame(maxWidth: 50)
.foregroundColor(Color(UIColor.white))
.scaledToFill()
.minimumScaleFactor(0.5)
.lineLimit(1)
}
.padding([.leading, .trailing], 5)
}
}
}