In slintpad the editor should follow the selection in the live preview
closely. So always ask to get focus and make sure to switch to the
editor that asks to get focused.
... and ignore them on file change notifications: The
Editor manages the file content, so we do not need to
care for the on-disk content for these files.
Get a notification of any file change/deleteion. This feels like
overdoing it a bit, but we need to reload when resources change
and those can be anything.
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"
We recently got better support for inlined elements. Use
The `ElementRcNode` when accessing properties, so that
we can actually have a better idea which SyntaxNode we
need to work on.
This is actually not too critical as the LSP does little
inlining, but I wanted to reuse this on the preview side
as well, which does inlining much more aggressively.
Do NOT access properties in the live preview though:
It is heavily optiomized, so most properties are just
gone there;-)
... and make it show up in the code/live preview.
Currently layouts are not supported and it will try to drop
onto elements not accepting children.
But it does add the necessary import statement already.
Move the code that sends to the editor from within the LSP and the live
preview into a module in common.
This makes it clearer what actually happens and allows to remove some
code from the preview that does not really belong there.
The messages serialized through the LSP should use the LSP's url type.
And keep type information as long as possible.
Otherwise, we'd end up in show_document_request_from_element_callback
with either an URL or a path, depending if the preview is native or not,
and that would fail when re-serializing to an URL to send back to
through the LSP
We want the previewer to become interactive, so we need to pass on the
document versions so we can detect the editor, lsp and previewer going
out of sync.
A None value means the file on disk is the golden version.
We have an editor, the LSP and the preview that all need to at least
notice when they have newer data then their peers. So IMHO it makes
sense to have an optional document version around.
The language server protocol makes use of a version number already. This
patch moves that code into the compiler so that it is stored with the
actual data getting versioned.
- Put the config in a struct so its easier to pass around
- respect the command line args as default for the style
- fix compilation without the preview feature
* Make sure design mode stays enabled when refreshing the preview. This
stops the strange click-throughs from happening
* Keep highlighting enabled while in Design Mode