stackotter / swift-cross-ui

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

[AppKitBackend] Implement Spacer #78

Closed stackotter closed 2 months ago

stackotter commented 7 months ago

Currently there's a dummy spacer implementation so that examples which rely on Spacer can at least run, but it doesn't actually do anything. I had a look around and couldn't find any good resources on making a Spacer-like view with AppKit (the concept of 'expanding view' doesn't seem like a thing?). Maybe an AppKit guru out there can help come up with a good solution!

stackotter commented 2 months ago

All backends get spacers for free under the new layout system (currently on the layout_system branch). Spacers are now implemented at the layout system level and don't require any special widgets.