We really shouldn't require specifying a color for every Text {} element just in order
to see *some* text.
For Rectangle OTOH transparent is a good default (and thus for Color), hence
this change just to Text.
Right now the constructor bit is also a bit repetitive, this could
perhaps be folded into BuiltinItem to generate the ffi, default impl and
forward to an init function if it exists.
The printer demo looks slightly less boring on white background with brighter colors.
In exchange, the controls can become more dull and hopefully easier to see.
Use slightly aggressive colors for the buttons of the printer demo,
shrink the ink cartridge bars a little and replace the red for the 2000
with a more subtle silver.
Based on privately received feedback ;-)
Instead, pass a reference to the root item when mapping the window,
at which point we can downcast to the new Window item. If we have one,
then we'll read its width/height (for initial values) and install
bindings to keep them up-to-date.
This adds horizontal_alignment/vertical_alignment properties, along with
width/height to Text.
This still uses a hard-coded enumeration in the compiler, which is meant
to go away in favor of general enum support.
Map it to 800x600 logical pixels for a better initial look.
This implements respecting the initial values for width/height and tries
to apply them to the window begin created.
The PinnedOptionalProp wrapper is needed because while cbindgen mapped
the previous Option<&...> to a raw pointer, the new Option<Pin<&...>> is
not detected as a pointer.