This also removes the funny binding on the button in the gallery.
UI wise it's confusing that a button changes its size when pressed, and we can
show off bindings somewhere else :-)
The layout before this patch resulted in constraints where the maximum
width was less than the calculated minimum width.
To avoid this situation, this patch rewrites the layout to use a central
vertical layout and places the items that we don't want to stretch into
horizontal boxes with a spacer.
The logical pixels are now just called "px" and the less frequently
used physical pixels have the "phx" suffix.
The existing markup was adapted using the syntax updater and the
following patch:
+ if node.kind() == SyntaxKind::NumberLiteral {
+ if node.text().ends_with("lx") {
+ return write!(
+ file,
+ "{}px",
+ node.text().as_str().split_at(node.text().as_str().len() - 2).0
+ );
+ }
+ if node.text().ends_with("px") {
+ return write!(
+ file,
+ "{}phx",
+ node.text().as_str().split_at(node.text().as_str().len() - 2).0
+ );
+ }
+ }
Fixes#49
By default the window is a little too small (in terms of height), so the list view is squished. We don't propagate the minimum size to the window yet, so bump the height by hand.
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.
Don't build wasm-bindgen-*, js-sys, console_error_panic_hook and web-sys
(and dependencies, total 9 crates) when not building for wasm.
Especially web-sys has a ton of .rs files in its crate and takes a
while.
- Give all the sixtyfps-* create a 0.0.1 version
- Make sure that the internal dependences are using the exact same version
(so "=0.0.1")
- Add the description/homepage/repository fields in the .toml files
- Set publish=false to crates that are not meant to be published on crates.io