Yes that window is transparent. :}
window.setBackgroundColor_(NSColor::colorWithCalibratedRed_green_blue_alpha_(nil, 1.0, 0.5, 0.5, 0.5));
git clone https://github.com/Submersible/sycamore-mac.git
cd sycamore-mac
cargo run --example simple_example
Sycamore makes it really easy to extend, almost simply by implementing GenericNode.
Main issue is figuring out to create the Mac UI using cocoa & objc, plus lots of trial and error reading the AppKit documentation. 🥴
- View component
- Simple horizontal & vertical layouts
- Children with constant sizes
- Text component
- Text font family
- Text color
- Text size
- Text input component
- Change event binding
- Component
- Click event
- Mouse move event
- Window component
- Create more todo items...
- Launching a window on Mac, from a sycamore template (bindings don't work)
Right now strugglying to figure out how to auto layouts, so that components positions & sizes don't need to be manually set--something like the flexbox model would be ideal.
-
It seems like the like cacao provides a much better interface than cocoa, plus there is an example that shows exactly how to use Auto Layout: https://github.com/ryanmcgrath/cacao/blob/f558f8e24d6c4f869a4135bd230222455a435dcf/examples/autolayout.rs
To preview this functionality:
git clone https://github.com/ryanmcgrath/cacao.git cd cacao cargo run --example autolayout
-
There's also someone using NSLayoutConstraint directly through objc, but this looks less fun, and no rust crate to import.