- From C++, always call the Window::show() and hide() function instead
of going through set_visible directly as it doesn't set the size of
the WindowItem
- show() should also call resize on the renderer
- remove the is_visible in the WindowAdapterInternal as it is no longer
needed
two bugs:
- If the .slint file did not contain any import, the depfile would have
no dependencies, and as a result, ninja would consider that it is
always dirty.
- In case the binary dir is a sub directory, the dependencies were
relative to the wrong directory. Thgis is because the behavior
changed in some version of cmake (see https://cmake.org/cmake/help/latest/policy/CMP0116.html)
to avoid any problem, use the absolute paths
Fixes#3261
- QWindow::hide() don't terminate the application. QWindow::close() does.
- But QWindow::close() also recurse in the closeEvent, so we must
prevent the recursion with m_visible
Fixes#3363
A recent MSVC update requires clang 16 when building with clang against the MSVC headers.
The Skia build compiles with clang and is thus affected.
This will be reverted once llvm16 becomes available on the GH runners.
- make sure the Platform::Clipboard type is properly documented
- Use the actual enum in the interface (even though it is
#[non_exhaustive] so we need to slience a warning)
CC: #3265
... and provide hints in there about implementing window close requests.
Note: The links to set_size() and set_position() are not resolved, as
these virtual functions are still missing from the WindowAdapter base
class.
show() now let's Slint maintain a strong reference to the component, so
that it's easy to create new windows without having to do an awkward
dance around keeping the component alive.
Closes#3328
No behavior should change in this patch!
Move all the code directly related to the LSP into a `language` module,
with `server_loop.rs` becoming `language.rs`, managing that module.
All the preview related code is moved into `preview`, with `preview.rs`
basically forwarding to `native.rs` and `wasm.rs`.
Code accessed from both `language` and `preview` stayed where it was.
With C++, we would not forward the opengl/vulkan flags to the skia renderer, so
selecting no backend but just the SKIA_RENDERER_OPENGL would end
up merely selecting Skia, not activating the opengl feature.
The renderer features will continue to be delegated to the backend
selector crate, where they will be activated directly in the renderer.
The merge of the wasm preview inside the wasm lsp blob had the unintentional
consequence to stop the wasm interpreter from being built at all (since it
used to be build from the slintpad package.json command), but we still need
it for the doc preview and co.
Build it as it used to be build long before (before commit d506c9d553)
using a direct call to wasm-pack
This way we can ship only the LSP as a WASM bundle in Slintpad and
VSCode, reducing the overall size a bit.
So far this just takes the code and API of the wasm-interpreter and puts
it into the LSP: Integrating that properly is not done yet.
It specified a height: 100% which set the layout info to have a
`min_percent: 100.0` which bubbles on other layout.
Arguably that's a bug in layouts but this 100% shouldn't be there.
CC: #3346
This should make it simpler to actually unify the WASM binaries of the
previewer and the LSP in an extra step.
Turn the PreviewApi into a trait object for easier use and
documentation.