From 4b4e69d7525ad106428d02e49d6ca67e14ae070c Mon Sep 17 00:00:00 2001 From: Trey t Date: Thu, 10 Feb 2022 11:29:22 -0600 Subject: [PATCH] fix huge numbers turning into ... in top roll up header --- Shared/views/SmallRollUpHeaderView.swift | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/Shared/views/SmallRollUpHeaderView.swift b/Shared/views/SmallRollUpHeaderView.swift index 6165dcc..32593ad 100644 --- a/Shared/views/SmallRollUpHeaderView.swift +++ b/Shared/views/SmallRollUpHeaderView.swift @@ -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) } } }