Tokamak
Tokamak copied to clipboard
Text does not center when background and frame modifier is used
Describe the bug Text does not center when using the background and frame modifier.
Creating a background modifier with a coloured background does not show the text centered in the middle of the defined frame.
To Reproduce
struct ContentView: View {
var body: some View {
VStack {
Text("1")
.font(.system(size: 32))
.frame(width: 80, height: 80, alignment: .center)
.background(Color.yellow)
}
}
}
Expected behavior Text should center vertically and horizontally within the defined frame.
Screenshots
This is what happens currently, built in Tokamak.
![Screenshot 2021-01-21 at 7 50 34 PM](https://user-images.githubusercontent.com/24926784/105347485-f0e2be80-5c21-11eb-8614-5ed26157c9a4.png)
And this is what is expected with SwiftUI, same code built in Swift Playground.
![Screenshot 2021-01-21 at 7 49 39 PM](https://user-images.githubusercontent.com/24926784/105347391-ce50a580-5c21-11eb-83b7-36091a14a8b1.png)
Desktop (please complete the following information):
- OS: macOS 11.1
- Browser: Chrome
- Version of the browser: 87.0.4280.141 (arm64)
- Version of Tokamak: 0.61
Hi Can you assign me this issue