TokamakUI / Tokamak

SwiftUI-compatible framework for building browser apps with WebAssembly and native apps for other platforms
Apache License 2.0
2.62k stars 111 forks source link

HStack/VStack aligmment is wrong for overflowing items. #554

Open shial4 opened 1 year ago

shial4 commented 1 year ago

Describe the bug VStack/HStack alignment is wrong for overflowing items. Let me describe bub on HStack example HStack with smaller frame than content aligns items in center where it should start aligning them from the first item (leading)

To Reproduce Steps to reproduce the behavior:

  1. Create HStack with fixed size i.e. 200
  2. Create HStack content for instance items of size 80 times 5
  3. Items are aligned in center

Expected behavior Items aligned from the leading edge starting with 1st element, same way as SwiftUI does it.

Screenshots Screenshot from 2023-10-22 11-04-27

shial4 commented 1 year ago

SwiftUI example

Screenshot 2023-10-22 at 11 17 24

shial4 commented 1 year ago

actually, after further investigation. I'm not sure what is the root of it, but behaviour is different for the same code in SwiftUI