Clean up the circle text a bit

This commit is contained in:
Garth Vander Houwen 2024-05-28 13:27:25 -07:00
parent 58e7a53c30
commit b7aa76564f

View file

@ -16,11 +16,20 @@ struct CircleText: View {
Circle()
.fill(color)
.frame(width: circleSize, height: circleSize)
#if os(macOS)
Text(text)
.frame(width: circleSize * 0.96, height: circleSize * 0.96, alignment: .center)
.frame(width: circleSize * 0.95, height: circleSize * 0.95, alignment: .center)
.foregroundColor(color.isLight() ? .black : .white)
.font(.system(size: 3000))
.minimumScaleFactor(0.002)
.minimumScaleFactor(0.001)
#else
Text(text)
.frame(width: circleSize * 0.95, height: circleSize * 0.95, alignment: .center)
.foregroundColor(color.isLight() ? .black : .white)
.font(.system(size: 5000))
.minimumScaleFactor(0.001)
#endif
}
.aspectRatio(1, contentMode: .fit)
}