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
Tobias Hunger
0e751b1eea
livve-preview: Make the color widget editable
...
... in a bare-bones fashion.
2024-09-18 15:38:45 +02:00
szecket
126ab85366
live-preview: Prettify the property editor
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
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
Simon Hausmann
2ccc468b27
Fix location of comment
2024-09-12 13:30:55 +02:00
Simon Hausmann
5825cb4f46
Use command instead of control for the status text when running on macOS
2024-09-12 12:48:34 +02:00
Tobias Hunger
677838de83
live-preview: Only show style dropdown when importing std-widgets
2024-09-10 16:21:57 +02:00
Tobias Hunger
242ff57d5e
live-preview: Add reload preview command to Api
...
... and make `Ctrl-Shift-R` trigger it in edit mode, in the same broken
way we handle the `Delete` key. It works -- till you hit `Tab` to move
the focus.
We really need #4063 or similar!
2024-09-10 14:19:54 +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
64e8330d04
live-preview: Add setter for color property changes
2024-08-30 19:52:55 +02:00
Tobias Hunger
a7c0ae30e8
live-preview: Report property values with units to UI
2024-08-29 17:08:26 +02:00
Tobias Hunger
82fad654a4
live-preview: Parse Color in property data
2024-08-29 17:08:26 +02:00
Tobias Hunger
fae9b09d86
live-preview: Parse Float32 in property values
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
6d81096ac6
live-preview: Use PathBuf in DeclarationInformation
2024-08-23 18:58:44 +02:00
Tobias Hunger
51c5c67aa8
live-preview: Fix syntax errors in api.slint
...
Sometimes I am surprised my code works.
2024-08-22 23:23:51 +02:00
Olivier Goffart
3a59950751
Experimental support for named callback parameters
...
And use that in the lsp/ui implementation instead of comments.
This is only a parser support for now, the name is otherwise unused.
Hence I rather keep that experimental.
2024-08-19 14:10:01 +02:00
Tobias Hunger
0b99a3d023
live-preview: Use preferred size when requesting preview
...
Force the preview to preferred size when explicitly asking to
preview something.
2024-08-15 13:47:25 +02:00
Tobias Hunger
092ca597bb
live-preview: Remove history navigation
...
We apparently do not want history-based navigation,
so remove the code supporting that again.
2024-08-14 16:05:24 +02:00
Tobias Hunger
3f41b6f69d
live-preview: Make component selection more robust
...
... by not relying on the component name, which could be used in several
files.
2024-07-17 17:52:12 +02:00
Tobias Hunger
34c9351c31
live-preview: List more components in the components list
...
* Show all file-local componanets (check is-exported)
* Parse all known files before generating the file list
Keep the document_cache with all the extra documents loaded around,
2024-07-11 18:54:40 +02:00
Tobias Hunger
489d6c6a5b
live-preview: Update categories displayed in the library
...
* Show all builtin elements under "Builtin Elements"
* Show all std-widgets under "Widgets"
* Show everything else under its file name.
2024-07-10 17:17:17 +02:00
Tobias Hunger
ec87f555e9
live-preview: Use drop-down in property editor for enums
2024-07-10 11:47:06 +02:00
Tobias Hunger
05e0b4dc68
live-preview: Have a simple mode for bools and strings
...
The property editor built into the live-preview now comes with the
concept of a "simple/complex mode". There is a "K" (for complex, obviously;-)
or a "S" (for simple, just as obvious) beween the property name and property
value. you can click on the letter to switch from simple to complex mode,
but you can only switch back to simple mode if there are no complex expressions
in the line edit.
This implements a "simple" mode for bools.
# Todo
* [ ] Find icons for simple/complex mode:-)
* [ ] Figure out how to decide whether other types are "simple"
* [ ] Define more UIs for simple types
live-preview: Move simple property code into rust
... and handle simple strings in addition to bool.
2024-07-10 11:47:06 +02:00
Tobias Hunger
5663aa0cfd
live-preview: Navigate to property
...
Clicking on an existing property in the PropertyEditor will ask
the editor to navigate to the right place.
2024-06-28 18:55:32 +02:00
Tobias Hunger
74a8779e9c
live-preview: Add a property editor
2024-06-28 10:58:45 +02:00
Tobias Hunger
80bab3c04d
live-preview: Pretty up the Api file
...
No code change, just rearrange lines and some more comments.
2024-06-26 17:19:07 +02:00
Tobias Hunger
bd32c2f143
live-preview: Use a global Api object in the UI
...
... to avoid going throught the root node with everything.
2024-06-26 15:14:14 +02:00