So that we can pass the focus into the container when it first
shows.
I thought this would be super complex to do property! What a
nice surprise:-)
Fixes: #4055
The previous solution meant a hidden TouchArea the size of the live-preview handled dragging the color picker. This won't scale as now multiple pickers need to show for the brush picker gradient editor.
This change means the picker now handles the drag logic itself with it's own internal TouchArea.
This change also fixes an issue where moving the window very quickly showed a bug in the code that stops the window moving out side the bounds of the live-preview. It would stop, but too early with a few pixels to spare. Now the picker stops at the actual window bounds.
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.
* live-preview: Show why no live data is present
Always list all elements that *could* have live
data, add a Text about "no properties" into empty
ones.
Co-authored-by: Simon Hausmann <hausmann@gmail.com>
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.