Otherwse they show up as error because of the deny(warning) in the test.
This is not a problem in the CI because CI uses --all-features that use
the build-time thing, but this is a problem when running locally
If a `slint.json` file is found, that one is parsed for extra
information like what is the main file and what extra mappings exists
(e.g. so you can redirect to images, etc. in different repositories).
We have a lot of fun with the URLs/file names we use:
* We need to map URLs (e.g. to store them in Gists), so we can not just use
the external URLs everywhere :-(
* We need some way to tell "internal" URLs from external ones
* We want "https" as that works best in a browser: "file" tends to
fail to load for security reasons, "inmemory" is no proper scheme.
* LSP/Previewer and Editor disagree on the "inmemory" scheme, which has
caused me headaches before.
So use https URLs with an authority of "<UUID>.slint.rs" and treat them
as internal URLs.
Wait for the service worker to come up fully. The API is a bit unwieldy,
but we tell to not wait and to claim all clients, so it should come up
the first time round.
This service worker can be used to report and remap access to resources
from the previewer. We will need this feature to be able to meaningfully
export data.
This is not used yet!
In order for GLX support to work, we need to create the X11 window with
the same visual as in the GLX configuration. That requires delaying
the creation of the window.
This is done in four parts:
- The window builder is re-introduced in the winit backend create
internal renderer interface.
- The glcontext helper code for wasm was moved into a separate function
(less indentation).
- The loop over different display preferences was replaced with a
preference to the "window system native GL interface" over EGL,
which should achieve the same as the fix for #2162. Upstream glutin
defaults to this and so do various downstream projects.
- Use glutin-winit for the actual display selection.
This covers the FemtoVG bits of #2269
We cast the result of the body of functions or binding expressions to
the target type via `as _`. When the code contains a return expression,
that works fine, because `return`'s type is the never type, which can be
coerced to a value of any type. However when the return statement is
inside a sub-block, the type becomes `()`, for which the `as _` cast
fails.
Work around this by attempting to detect the situation (return produces
Type::Invalid) and omit the trailing cast.
The break_text algorithm was O(N²) in the number of lines because
break_text needs to layout the whole text dspite it would in theory
only need the first line.
Trim the text we pass to break_text so we don't need to re-layout the
end for the text for every call.
This is still O(N²) if there are very long lines.
Not sure we can fix that with the current femtovg break_text api
This makes TextEdit with many lines much faster. Still a bit slow, but
at least usable
Otherwise, the cache is trashed with already moderate text size causing
TextEdit to become quickly very slow (unusable) when the text becomes a
bit big.
Big text are horribly still slow but at least now it can be used without
freezing the app for minutes
- This allows creating the Skia GL interface without string allocations
- Port the item renderer to use SkImageFilters::Shader instead of
SkImageFilter::Paint
The navigation sidebar requires jquery, which from Sphinx >= 6.0 needs
to be bundled via a separate extension. In the C++ docs Sphinx remains
at version 4.5.0 (due to exhale), but the slint language site doesn't
need exhale (no C++) and thus Pip ends up picking a newer Sphinx
version.
Fix the code to always return a direct child widget or nullptr. The
documentation says to return a direct or indirect child, but the
implementation expects a direct child.
Fixes: #2195
Do not raise an alert for URLs the LSP/previewer requested. This prevents breaking the flow as the user types an import statement which the LSP/previewer then can not find.
Continue to alert about problems with URLs explicitly opened by the user. This is important so that we do not silently fail when trying to open a file from an URL.
Fixes: #2377