Commit graph

51 commits

Author SHA1 Message Date
Olivier Goffart
0796bb1db4 live-preview: Simplify the code of the property editor
Put the NameLabel outside of the typed property widget
2025-10-02 10:38:59 +02:00
Olivier Goffart
9a882dd17f live-preview: Only show the "Select an Element" text if there is no element selected
Some checks failed
CI / build_and_test (--exclude bevy-example, ubuntu-22.04, 1.85) (push) Has been cancelled
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, --exclude bevy-example, windows-2022, 1.85) (push) Has been cancelled
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, macos-14, stable) (push) Has been cancelled
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, windows-2022, beta) (push) Has been cancelled
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, windows-2022, stable) (push) Has been cancelled
CI / build_and_test (ubuntu-22.04, nightly) (push) Has been cancelled
CI / node_test (macos-14) (push) Has been cancelled
CI / node_test (ubuntu-22.04) (push) Has been cancelled
CI / node_test (windows-2022) (push) Has been cancelled
CI / cpp_test_driver (macos-13) (push) Has been cancelled
CI / cpp_test_driver (ubuntu-22.04) (push) Has been cancelled
CI / cpp_test_driver (windows-2022) (push) Has been cancelled
CI / cpp_cmake (macos-14, 1.85) (push) Has been cancelled
CI / cpp_cmake (ubuntu-22.04, stable) (push) Has been cancelled
CI / cpp_cmake (windows-2022, nightly) (push) Has been cancelled
CI / cpp_package_test (push) Has been cancelled
CI / vsce_build_test (push) Has been cancelled
CI / mcu (pico-st7789, thumbv6m-none-eabi) (push) Has been cancelled
CI / mcu (pico2-st7789, thumbv8m.main-none-eabihf) (push) Has been cancelled
CI / mcu (stm32h735g, thumbv7em-none-eabihf) (push) Has been cancelled
CI / mcu-embassy (push) Has been cancelled
CI / ffi_32bit_build (push) Has been cancelled
CI / docs (push) Has been cancelled
CI / wasm (push) Has been cancelled
CI / updater_test (0.3.0) (push) Has been cancelled
CI / fmt_test (push) Has been cancelled
CI / esp-idf-quick (push) Has been cancelled
CI / android (push) Has been cancelled
CI / miri (push) Has been cancelled
CI / test-figma-inspector (push) Has been cancelled
The property list can be empty if there is a search term that doesn't match
2025-09-12 17:25:40 +02:00
Olivier Goffart
dfbd2bda6c live-preview: search line edit in property list 2025-09-12 17:25:40 +02:00
szecket
7c0b9b31a3
live-preview: added a component-name (#9364)
Some checks are pending
CI / build_and_test (ubuntu-22.04, nightly) (push) Blocked by required conditions
CI / node_test (macos-14) (push) Blocked by required conditions
CI / node_test (ubuntu-22.04) (push) Blocked by required conditions
CI / node_test (windows-2022) (push) Blocked by required conditions
CI / python_test (macos-14) (push) Blocked by required conditions
CI / python_test (ubuntu-22.04) (push) Blocked by required conditions
CI / python_test (windows-2022) (push) Blocked by required conditions
CI / cpp_test_driver (macos-13) (push) Blocked by required conditions
CI / cpp_test_driver (ubuntu-22.04) (push) Blocked by required conditions
CI / cpp_test_driver (windows-2022) (push) Blocked by required conditions
CI / cpp_cmake (macos-14, 1.85) (push) Blocked by required conditions
CI / cpp_cmake (ubuntu-22.04, stable) (push) Blocked by required conditions
CI / cpp_cmake (windows-2022, nightly) (push) Blocked by required conditions
CI / cpp_package_test (push) Blocked by required conditions
CI / vsce_build_test (push) Blocked by required conditions
CI / mcu (pico-st7789, thumbv6m-none-eabi) (push) Blocked by required conditions
CI / mcu (pico2-st7789, thumbv8m.main-none-eabihf) (push) Blocked by required conditions
CI / mcu (stm32h735g, thumbv7em-none-eabihf) (push) Blocked by required conditions
CI / mcu-embassy (push) Blocked by required conditions
CI / ffi_32bit_build (push) Blocked by required conditions
CI / docs (push) Blocked by required conditions
CI / wasm (push) Blocked by required conditions
CI / wasm_demo (push) Blocked by required conditions
CI / tree-sitter (push) Blocked by required conditions
CI / updater_test (0.3.0) (push) Blocked by required conditions
CI / fmt_test (push) Blocked by required conditions
CI / esp-idf-quick (push) Blocked by required conditions
CI / android (push) Blocked by required conditions
CI / miri (push) Blocked by required conditions
CI / test-figma-inspector (push) Blocked by required conditions
2025-09-08 20:02:29 +02:00
Olivier Goffart
27497dffbf live-preview: Remove the search on the properties panel for now 2025-09-08 17:46:55 +02:00
szecket
75c5ec7763 live-preview: update library search
- updating search
 - integrated search and ViewHeader into Library
 - fix up header to accomodate other views
2025-09-08 17:46:55 +02:00
Olivier Goffart
db85a0b786 live-preview: hide the "id" line edit for the root 2025-09-08 16:53:57 +02:00
szecket
ae38d763e6 style id to match other properties 2025-09-08 16:53:57 +02:00
szecket
43a3b9a6b3
live-preview: split out the data tab and used menus for widgets (#9148) 2025-08-21 16:11:22 +02:00
szecket
416c6d0f34
visual-editor: clean up property and data display (#9049) 2025-08-02 13:47:44 +02: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
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
szecket
d9fb96b18e fixed the component display
some strange focus issue remains
2025-02-21 16:25:05 +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
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
autofix-ci[bot]
b040e9450a [autofix.ci] apply automated fixes 2025-02-05 14:26:29 +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
d154cde14c live-preview: Disable property editor when preview is not current 2024-12-09 13:26:41 +01:00
szecket
418f279abd
Sub attributes2 (#6749)
* spacing correction

* converted all property value blocks to widgets

* added secondary controls for color and string

* added secondary visuals to make hierarchy more visible

* live-preview: Wire up color widget with the backend

It lets you select colors based on the sliders, but it will
*only* apply the color when you hit enter on the text field
with the color string...

Not nice, but at least it does not keep losing state as it
round-trips the change through the code and compiler and
gets the state reset all the time.

* more dummy data

* cleanup of property sheet based on new controls

* added secondary visuals to make hierarchy more visible

correct extraneous changes

---------

Co-authored-by: Tobias Hunger <tobias.hunger@slint.dev>
2024-11-19 02:55:30 +13:00
Olivier Goffart
d6706494a5
Binding between a read only property to input-output is deprecated (#6419)
ChangeLog: deprecated two way binding between `in` and `in-out` property

Fixes #6400
2024-10-01 16:00:06 +02:00
szecket
8f8eb0d120
made adjustments using the awesome new data in api (#6223) 2024-09-20 03:32:10 +12:00
Tobias Hunger
04e11ec849 live-preview: Remove some dead code form property-view.slint 2024-09-19 15:51:56 +02:00
Simon Hausmann
cd1de28cd7 Make it easier to preview the properties view
Provide some dummy property data, and provide a preferred height that makes the preview show the properties.
2024-09-19 12:11:21 +02:00
szecket
860014a8f1
Cleanup columns (#6202)
* floatwidget and ResettingLineEdit updated

* ColorWidget adjusted

* most attributes visible again

* spacing more consistent and added italic to not-edited double encoding

* all controls rendering.

* consistent sizes for all column distributions.

* removed debug code and optimized logic a bit
2024-09-18 18:31:25 -04:00
Tobias Hunger
f968b1d135 live-preview: Apply on focus change
Apply changes when the focus changes out of a 
(Resetting)LineEdit..
2024-09-18 23:22:42 +02:00
Tobias Hunger
bdf173d08c live-preview: Update the down-arrow icon
... using the chevron-down icon from the codicons
icon set.
2024-09-18 21:30:18 +02:00
Tobias Hunger
0e751b1eea livve-preview: Make the color widget editable
... in a bare-bones fashion.
2024-09-18 15:38:45 +02:00
Tobias Hunger
81be4f2208 live-preview: Reset can-compile when resetting to property value
... in ResettingLineEdit.
2024-09-18 15:38:45 +02:00
Tobias Hunger
ef18244b31 live-preview: Mark wrong code as wrong again
... and fix the FloatWidget not passing on the unit, breaking
the update of property data.
2024-09-18 13:42:02 +02:00
Tobias Hunger
33afbe7cf6 live-preview: Print properties set in an element in bold 2024-09-18 10:54:10 +02:00
szecket
126ab85366 live-preview: Prettify the property editor 2024-09-17 18:39:37 +02:00
Tobias Hunger
2d8323be5a live-preview: Add a ResetButton for properties
This button can be used to remove an existing property
assignment, thus resetting to the default value the
element inherited.
2024-09-17 18:39:37 +02:00
Tobias Hunger
41bdadd960 live-preview: Add a CodeButton component
... and use it in places
2024-09-17 18:39:37 +02:00
Florian Blasius
a32b0ac6d0 live-preview: Refactoring of property editor ui code 2024-09-17 18:39:37 +02:00
Tobias Hunger
ca64212369 live-preview: Less model updates for property editor
Move the model into an extra porperty and move information
irrelevant for the UI behind a callback, so that changing that info
will not invalidate the UI.
2024-09-17 10:29:31 +02:00
Tobias Hunger
063d976d28 live-preview: Report @tr properly to property editor
... so that all information for a round-trip into the Property editor
and back is available.
2024-08-30 19:52:55 +02:00
Tobias Hunger
c92960b9d3 live-preview: Remove setters that are not too helpful
We are getting too many setters for properties in our Api IMHO,
so remove two that are easy enough to replicate with `set_code_property`.
2024-08-30 19:52:55 +02:00
Tobias Hunger
aadff0ca42 live-preview: Show properties for Empty
For beauty-reasons we no longer report `Empty` though and replace
that with `""`. This prevents the property editor from showing a UI:
The `type-name` field being empty was abused to indicate that no
data is available -- we do not have options in Slint :-/

Replace that test with the length of the model holding the properties.

We assume we got no data when that model is empty... which is probably
a safer bet for "no property data availabel" than the `type-name`
field.
2024-08-30 18:56:04 +02:00
Tobias Hunger
a7c0ae30e8 live-preview: Report property values with units to UI 2024-08-29 17:08:26 +02:00
Tobias Hunger
e0cf679c0f live-preview: Improve conversion of property info to UI
... and use that in the (still almost unchanged) UI.
2024-08-28 18:02:47 +02:00
Tobias Hunger
7572869541 live-preview: Remove splitter from PropertyEditor 2024-08-28 11:01:57 +02:00
Olivier Goffart
6f51c975f5 LSP: don't answer "Empty" for component that do not inherit
... instead of chekcing for "Empty" in the Slint code

Do the suggestion from https://github.com/slint-ui/slint/pull/5625#issuecomment-2228976684
2024-08-08 12:05:29 +02:00
Tobias Hunger
f9320b4aff live-preview: Low-hanging fruit in the Property editor
* Resizing the key field works again (using an invisible hand-crafted splitter)
* The color of the active/inactive `f(x)` icon was inversed as suggested by
  Daniel.
2024-07-16 18:27:47 +02:00
Florian Blasius
ed8b05548d
lsp-ui: apply ux feedback for headers (#5628) 2024-07-16 11:57:13 +02:00
Tobias Hunger
c7f5e8df2e live-preview: Never report "Empty" as a base type of an element
... in the properties view.
2024-07-15 16:28:50 +02:00
Florian Blasius
96f2f15552
editor: added borders to groups (#5612) 2024-07-12 15:24:35 +02:00