stackotter / swift-cross-ui

A cross-platform declarative UI framework, inspired by SwiftUI.
https://stackotter.github.io/swift-cross-ui/documentation/swiftcrossui/
MIT License
651 stars 36 forks source link

[GtkBackend] Center root view in Window (this is what SwiftUI does) #81

Closed stackotter closed 2 months ago

stackotter commented 7 months ago

If you run CounterExample you'll see that the window content is in the top left corner of the window (if you resize the window to make it bigger), whereas it's preferable that it would be centred inside the window to align with SwiftUI's behaviour (pun intended).

stackotter commented 2 months ago

The new layout system fixes this (currently on the layout_system branch).