Commit graph

16 commits

Author SHA1 Message Date
Tobias Hunger
1b88f70086 live-preview: Add a "show preview" button into the component list
... It is *UGLY*, really *UGLY*. But it works ;-)
2024-06-24 14:10:16 +02:00
Tobias Hunger
37d6922983 live_preview: Wire up component renaming 2024-06-21 14:40:50 +02:00
Tobias Hunger
97daf41245 live-preview: Add a button to add a new component with
... and make it trigger a function in preview.rs.
2024-06-19 11:45:37 +02:00
Aurindam Jana
3523e86359
Simplify commercial license (#3063)
Base the commercial license on the Royalty-free license adding clauses pertaining to the fees.
2024-05-31 14:06:17 +02:00
Aurindam Jana
9a3aa265d5
Update Royalty-free license (#5257)
Add clarification that Application may not expose Slint APIs.
2024-05-31 10:53:19 +02:00
Aurindam Jana
0cfeec1a31
Update Slint Community License (#4994)
Updated the version from 1.1 to 1.2 
Renamed the header to "Slint Royalty-free Desktop, Mobile, and Web Applications License"
Added definition of "Mobile Application" and grant of right
Moved "Limitations" to 3rd section and "License Conditions - Attributions" to 2nd section
Added flexibility to choose between showing "MadeWithSlint" as a dialog/splash screen or on a public webpage
Moved the para on copyright notices to section under "Limitations"
2024-04-15 15:18:55 +02:00
Tobias Hunger
7053a21749 live preview: Add a drop marker
Add a drop mark into DropInformation to visualize where an item will get added.

This is the UI side of things and some more preparational work.
2024-04-01 16:27:35 +02:00
Tobias Hunger
b4120fe312 live preview Do not handle key events in error case
Only process key events while the preview is in design mode and does
not show an error. So far the only key that actually does something
is the delete key, which deletes elements. Unfortunately we do not
know which text range is covered by the element we want to delete,
so we delete random chunks of text.

So disable that when we ran into an error.

This partially addresses #4872.
2024-03-18 15:10:31 +01:00
Tobias Hunger
feb96bb03b preview: Add more data to ComponentInformation
Add `fills_aprent` and `default_properties` to
`ComponentInformation`. The first is a bool showing
whether the Component will fill its parent or not.

The later is a set of properties that the UI will set
when the widget gets dropped.

Refactor the data passing a bit: Keep the data on known
components around. Pass only the component name into
the UI, but pass the entire `ComponentInformation` to
the `drop_location` methods.
2024-03-06 17:31:08 +01:00
Simon Hausmann
f932f25dea Design mode: Minor polish to the library side bar
- Use "Library" instead of "Assets" as title
- Don't scroll the title when scrolling through the controls/widgets
- Use a bigger font than the category separators
2024-02-26 14:16:51 +01:00
Tobias Hunger
e4a0a85e2f lsp: Pick one good instance when selecting/highlighting
We need to decorate an Element so we can interact with it. I want
to decorate only *one* instance of a repeated element to avoid
cluttering up the screen. So pick one good candidate for decoration:
Ideally the one the user clicked on, got for the first one
otherwise.

Store this information so we can get it back after re-rendering,
and so that we can actually mark newly added elements for selection
after they get rendered.
2024-02-19 22:27:32 +01:00
Tobias Hunger
17149505d8 live preview: Make the UI less ugly and only show it in design mode 2024-02-19 22:27:32 +01:00
Tobias Hunger
dd8fefd6a2 live preview: Polish drag-and-drop UI
* Add the import path into the sheared data so that
  is available when needed.
* Fix drop location, mouse pointers, ...
2024-02-12 15:03:08 +01:00
Tobias Hunger
c29314b2a8 lsp: Fix calculation of drop coordinates over the preview area 2024-01-26 13:19:48 +01:00
Tobias Hunger
03bed1a4eb lsp: Implement UI side of drag and drop
... the rust side is just qa mock yet.
2024-01-19 09:14:02 +01:00
Tobias Hunger
7754fccdd4 lsp: Add Sidebar showing available Components
Just show what all the components currently available.
2024-01-19 09:14:02 +01:00