Items are auto centered these days so no need for extra bindings.
The buttons also look after themselves and don't need logic in the loop to resize them.
There's an issue that the live-preview doesn't respect the preferred size when actively choosing to preview a new component, but regardless it makes sense to avoid shrinking the printer demo.
Amends ccc795beb8
* The general page change animation is more subtle. It's now a combo of fade in and move. As opposed to a full page slide.
* The SVG also has been tweaked to make it symmetrical and remove the lopsided bulge it had.
* The sidebar buttons touch area covers the whole space they represent, as opposed to just being the same size as the icon.
* The code has been simplified a bit. Layout values are moved to DemoPalette and animation values are based on reusable variables to make changing the timings easier.
The property editor built into the live-preview now comes with the
concept of a "simple/complex mode". There is a "K" (for complex, obviously;-)
or a "S" (for simple, just as obvious) beween the property name and property
value. you can click on the letter to switch from simple to complex mode,
but you can only switch back to simple mode if there are no complex expressions
in the line edit.
This implements a "simple" mode for bools.
# Todo
* [ ] Find icons for simple/complex mode:-)
* [ ] Figure out how to decide whether other types are "simple"
* [ ] Define more UIs for simple types
live-preview: Move simple property code into rust
... and handle simple strings in addition to bool.
This reverts commit 060f63ad56, as it broke the C++ interpreted demo and makes it impossible to implement the demo "fully" in JavaScript and Python.
cc #4777
In the screenshot tests this works by setting SLINT_DEFAULT_FONT to
pointer to a directory, instead of a file. We then load all fonts in
that directory and consider their families the default unless a family
is specified. This way for "Noto Sans" a regular as well as an italic
version is registered in fontdb and returned in the list of font
fallback ids. embed_glyphs in the compiler then embeds those variants
and we find them at run-time.
* Use a jpg over an png, which is much smaller
* Do not round the image
* Change the image file extensions used in the demos to reflect the
actual image format being used
* Do not use symlinks for images: This breaks the WASM demos
Use the reuse tool to get a better grip on licenses used in sixtyfps.
Fix a couple of licenses along the way.
* Uses creative commons for our own logo (commercial use!)
* Fixes some license information found in README files and documents
them with proper .license files.
* Document Apache/MIT for helper_crates/const-field-offset which matches
what its documentaion site says it uses.
* Add a list of licenses that apply to crates we publish and the tooling
we have.
This patch only adds static information and does not contain any tooling
support.