Commit graph

92 commits

Author SHA1 Message Date
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
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
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
590a021957 live-preview: Report errors when setting preview data
... into the StatusLine.
2025-03-04 10:41:23 +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
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
Tobias Hunger
c3b2654fed live-preview: Do not show "Code" button in Data preview
There is no information on code we might jump to,
so do not show that button.
2025-02-20 11:01:19 +01:00
Tobias Hunger
2b59df1355 live-preview: Simple Data edit mode
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.
2025-02-20 09:43:24 +01:00
szecket
28f83c64e2 live-preview: fixed indicator and made it show up when control is focused also
The indicator used to collapse secondary parts of the
property edit widgets did not work. Fix that.
2025-02-19 17:40:23 +01:00
Tobias Hunger
c71e2f3c96 live-preview: Do not offer plural forms in UI
@ogoffart relorts those do not fully work yet, so
let's just disable those for the time being.
2025-02-18 23:39:11 +01:00
autofix-ci[bot]
37d5d6d9fc [autofix.ci] apply automated fixes 2025-02-18 16:41:17 +01:00
Tobias Hunger
11886bafd6 lsp: Make code handling @tr() as porerty values more reusable 2025-02-18 16:41:17 +01:00
Tobias Hunger
70f994975e live-preview: Make translations reflect actual data
... instead of using the mock up data we used while
designing the UI and then passing back whatever the
business logic gave us for the translations.
2025-02-13 16:15:41 +01:00
Tobias Hunger
4b8287bd0f live-preview: Make property widgets use less information
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 ;-)
2025-02-06 16:59:05 +01:00
szecket
4af1cd3003 regression of clip corrected 2025-02-06 11:54:21 +01:00
Tobias Hunger
595b571f99 live-preview: Make ExpandableGroup more re-usable
I want to use this for runtime properties later.
2025-02-05 14:26:29 +01:00
Tobias Hunger
25f3bfd95c live-preview: Move widgets out of property-view
Move the widgets used for showing property values out
of the property-view itself, so we can reuse them later.
2025-02-05 14:26:29 +01:00
Tasuku Suzuki
346d1c2df3 Fix typos
Ran `typos .` and fixed all typos that do make sense.
https://crates.io/crates/typos
2025-01-13 08:35:20 +01:00
Olivier Goffart
3e94bd2167 Janitor: Remove trailing whitespaces from all files
`git grep -I -l -O'sed -i "s/[[:space:]]*$//"' -e ''`
2025-01-10 13:23:22 +01:00
Tobias Hunger
48c1909fb0
live-preview: Remember filter settings in selection popup (#7178) 2024-12-20 08:03:45 +13:00
Tobias Hunger
93edeebe2c
live-preview: Fix filter in selection popup being init to empty (#7177)
... till the filter button is pressed for the first time.
2024-12-20 06:58:52 +13:00
Tobias Hunger
cd4bab3f5b live-preview: Make filter in selection popup behave better
... more like a ContextMenu.
2024-12-19 18:14:47 +01:00
szecket
bf66b9756f
hack to keep focus as hover steals it (#7093) 2024-12-13 16:59:15 -05:00
szecket
5f8c88e0ec just moved the filterlist touch area so it catches hover from the button 2024-12-13 15:12:35 -05:00