This refactor is to help make future maintenance easier.
Items are now consistently named as brush instead of color.
Instead of one huge brush picker file, various elements such as gradients live in their own file.
The brush picker is also made a bit less 'smart' and doesn't have to fully understand how the current color or brush needs to be updated or if the data tab live preview needs to be updated. In turn the PickerData has been made smarter and looks after these updates.
This has fixed a few bug regarding gradient stops.
Adds a table editor based on the color picker floating draggable panel.
This includes behaviours that keep the panel inside the bounds of the live preview window and light / dark mode.
Those contain only one element informing about there not being any
properties to show. While I think it is important to show
that information so users have a chance to figure out how to
actually use the live data tab, it is not that important that
we need to always show it.
We can not transfer translation data over JSOn at this time,
so setting the trnaslation related flags breaks the UI.
It also makes little sense to set translatable strings at the level
of live data: That is the data in the application after the
translations were already applied.
At least it does set values again in Property Editor mode
and seems to work fine in general for me. But then I
think I said the same about 10 times today...
We have several types that all support a range of units.
Internally all those units match back to one "base unit"
that the type is measured in.
In the spirit of simplicity: Support only that base unit
for now.
We need a more elaborate JSON scheme to pass units around
with those numbers :-/
* live-preview: Disable Code and Reset buttons in live data mode
They make no sense there.
* live-preview: Fix up breakage due to hiding the buttons
* live-preview: Improve input handling for preview data
* Ignore changes while editing
* Apply chanegs once editing is done
* live-preview: Bring back the CodeWidget in PropertyEditor
* live-preview: Fix Code and Reset button in ColorWidget
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Only push basic information over the boundary in a model.
The values themselves now need to be queried via `Api`.
Pros:
* Slint tracks the properties automatically, no more
Property change tracker!
Cons:
* Live preview is less useful now as we can not yet provide
function call results via ourr data API.
We can now set all the properties exposed to the
business logic of a UI we are previewing.
Simple properties only so far, everything else falls
back to JSON data.
Next step is to add more sophisticated UI to actually
edit more complex data like arrays more graphically.
Make the property widgets work with less information avaiable to
them. I hope I can reuse them for runtime widget state as well that
way.
Unexport the individual widgets and wrap them into a `PropertyValueWidget`
that switches between them as needed -- and fills in the extra information
needed to keep the existing functionality in place.
This makes the PropertyView so much cleaner ;-)