Commit graph

346 commits

Author SHA1 Message Date
Nigel Breslaw
cbb5b96ade
Refactor out a reusable DraggablePanel (#8111) 2025-04-11 16:07:08 +03:00
Nigel Breslaw
36c7dcaf81
New Brush widget (#8082) 2025-04-10 22:58:01 +03:00
Tobias Hunger
e1b85bbb93 component-container: Accept focus
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
2025-04-09 09:37:28 +02:00
Nigel Breslaw
8b7c61a9d3
Simplify the color picker window dragging (#8053)
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.
2025-04-04 00:38:13 +03:00
Nigel Breslaw
566b5ed889
Slight tweaks to prepare for the brush/gradient widget (#8046) 2025-04-03 16:07:18 +03:00
Nigel Breslaw
d607651fb1
Make the new color picker work in the data tab mode (#8030) 2025-04-02 21:55:49 +03:00
Nigel Breslaw
51f7834f56
fix: Reszing live-preview could leave the color picker off screen (#8018) 2025-04-01 20:21:21 +03:00
Nigel Breslaw
60234663ad
Add light mode style to color picker (#8016) 2025-04-01 18:53:33 +03:00
Tobias Hunger
1822f95be8
live-preview: Implement backend code to handle tables of live data
This is just the backend side, no UI changes were done.
2025-04-01 17:36:50 +02:00
Nigel Breslaw
03c74383dc
nigel/picker-polish (#8015) 2025-04-01 17:38:36 +03:00
Nigel Breslaw
047377e94a
Simplify the live-preview widget layouts (#8011) 2025-04-01 15:50:05 +03:00
Nigel Breslaw
79382187ef
live-preview: Visual color picker (#7971) 2025-04-01 14:50:19 +03:00
Tobias Hunger
14b55e54b4 live-preview: Do not pass on signals from "invisible" widgets
This stops e.g. the color widget filling in default values for
empty strings.
2025-03-26 12:54:40 +01:00
szecket
d2e839a7c4 live-preview: Use context menu
... in the spreadsheet.
2025-03-25 15:48:31 +01:00
Tobias Hunger
731289c018 live-preview: Get rid of the "dummy" workaround
... used to get changed notifications for aliased properties.

This was fixed last week, so it is no longer necessary.
2025-03-25 15:47:41 +01:00
Nigel Breslaw
063678b29c
Stop live-preview checkerboard shifting as window resizes (#7932) 2025-03-24 15:08:50 +02:00
Tobias Hunger
e0b6e4f27d live-preview: Fix the gradient becoming inactive till a slider is touched 2025-03-21 18:11:45 +01:00
szecket
5a147e4fb4 shifted display of radial gradient to match dot locations 2025-03-21 18:11:45 +01:00
szecket
1206109179 added extra border to gradient dot to increase visibility 2025-03-21 18:11:45 +01:00
szecket
9748d75885 update value of angle when interacting with dial 2025-03-21 18:11:45 +01:00
szecket
0c3a095d76 live-preview: fixing lipstick, margin, inconsistent heights, adding the dial back in 2025-03-21 18:11:45 +01:00
szecket
daae2bb4c4 live-preview: added angle label tp brush widget 2025-03-21 18:11:45 +01:00
Tobias Hunger
b1200a1833 live-preview: Polish BrushWidget
It now works, provided the first thing you do is
to drag one of the color sliders ;-)
2025-03-21 18:11:45 +01:00
Tobias Hunger
8c68483b8c live-preview: Split up ColorWidget functionality into reuseble parts 2025-03-21 18:11:45 +01:00
Tobias Hunger
ee61df3d7e live-preview: janitor work: Split up the property-widgets.slint file
It got *WAY* to big.
2025-03-21 18:11:45 +01:00
Tobias Hunger
4cc7297188 live-preview: Make the "preview" part of the gradient edit work
... including adding/removing values and such. Whoho.
2025-03-21 18:11:45 +01:00
szecket
10907618d3 live-preview: Add some gradient widget component 2025-03-21 18:11:45 +01:00
Tobias Hunger
9020f6e537 live-preview: Add rudimentary BrushWidget
... and add helper code to enable the backend to set/show
Brush information.
2025-03-21 18:11:45 +01:00
Nigel Breslaw
fd330b655e
live-preview: Don't let unselect work when clicking on live content (#7897) 2025-03-20 17:05:18 +02:00
autofix-ci[bot]
9fdb122ecb [autofix.ci] apply automated fixes 2025-03-12 16:31:10 +01:00
Tobias Hunger
5e5ac0d1b4 live-preview: Polish the property widgets a bit
Use a GridLayout, that seems simpler and add a bit of extra padding.
2025-03-12 16:31:10 +01:00
Tobias Hunger
f6f8d92cec live-preview: Bring back the JSON editor till the table works!
I accidentally disabled the JSON editor for "table-like" elements.
Bring it back for now.
2025-03-07 14:58:42 +01:00
Tobias Hunger
bd20cb5a19 live-preview: Polish: Do not expand empty Property Groups
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.
2025-03-06 16:51:54 +01:00
Tobias Hunger
a90bb8d41b live-preview: Export live preview table data from BL 2025-03-06 09:02:33 +01:00
Tobias Hunger
b706e7a019 live-preview: Add EditMultiValueWidget
back in. It should open a spreadsheet view for
table-like data in the live data preview.
2025-03-06 09:02:33 +01:00
Tobias Hunger
5fcf6da7d2 live-preview: Spreadsheet UI files
... bring back the spreadsheet UI files.
2025-03-06 09:02:33 +01:00
Tobias Hunger
208723d8f7 live-preview: WindowGlobal object added
... so we can know the window size everywhere.
2025-03-06 09:02:33 +01:00
Tobias Hunger
590a021957 live-preview: Report errors when setting preview data
... into the StatusLine.
2025-03-04 10:41:23 +01:00
Tobias Hunger
3703005557
live-preview: Show why no live data is present (#7783)
* 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>
2025-03-04 10:41:05 +01:00
Tobias Hunger
5eef8517e5 live-preview: No translation for strings in Preview Data mode
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.
2025-02-27 22:56:18 +01:00
Tobias Hunger
c65fa456ce live-preview: Try to improve the Color Widget further
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...
2025-02-26 08:57:19 +01:00
Tobias Hunger
9679657bc6 live-preview: "Fix" types with units
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 :-/
2025-02-25 22:33:43 +01:00
Tobias Hunger
8fd18b66fd
live-preview: Remove bottons and then fix the fallout caused by all the layouts around us f-ing up all of a sudden (#7734)
* 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>
2025-02-25 18:32:14 +01:00
autofix-ci[bot]
27f2d1418c [autofix.ci] apply automated fixes 2025-02-24 19:08:08 +01:00
Tobias Hunger
15955cca75 Avoid if in PropertyValueWidget
This prevents the widgets from being re-generated all the
time, which in turn makes them loose their state.
2025-02-24 19:08:08 +01:00
Tobias Hunger
cb08935be0 live-preview: Spread purity around... 2025-02-24 19:08:08 +01:00
autofix-ci[bot]
03b80df515 [autofix.ci] apply automated fixes 2025-02-21 16:25:05 +01:00
Tobias Hunger
8b4e45f7be live-preview: Polish Json edit widget
* Add red overlay in case of invalid input
* Ignore value changes while focused
* Apply value changes when losing focus
2025-02-21 16:25:05 +01:00
szecket
d9fb96b18e fixed the component display
some strange focus issue remains
2025-02-21 16:25:05 +01:00
Tobias Hunger
f96ce07287 live-preview: Refactor Api between backend and UI
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.
2025-02-21 10:50:53 +01:00