Commit graph

10295 commits

Author SHA1 Message Date
Simon Hausmann
090665de13 Remove traces of required C++ exception support
After commit cf19749943 this isn't needed anymore.
2023-09-07 11:32:56 +02:00
Olivier Goffart
6e1132726a winit-sw: Loop over the buffer instead of using indices
It is possible that softbuf allocate a larger buffer than in needs?

Prospective fix for #3406
2023-09-06 16:04:03 +02:00
Olivier Goffart
cf19749943
Make a pass to remove the Expression::Return instruction
So it doesn't appear in the LLR and the C++ codegen can be simplified.
In particular, this removes the need to throw/catch exception to handle return
across generated lambdas
2023-09-06 14:10:26 +02:00
Olivier Goffart
a565ed53fd Upgrade MSRV to 1.70
Many of our dependencies already made the jump and require a cargo update hack, so make it official

Removed the MSRV from the README since it applies to master branch and people read the readme also for
the released version. There is enough documentation of the MSRV in other locations.
2023-09-06 12:09:03 +02:00
Adam Obuchowicz
644a39f1e8 Derive serde for Color 2023-09-06 11:15:34 +02:00
J-P Nurmi
60a6031840 lsp: fix find_element_indent() for named elements 2023-09-06 11:15:06 +02:00
Simon Hausmann
0816246d48 Comment out unused job 2023-09-06 10:27:51 +02:00
Simon Hausmann
2d4205b143 ci: Don't try to pass an empty pat to the vscode extension step 2023-09-06 10:22:41 +02:00
Simon Hausmann
31de58941c ci: make check-for-secrets pass when there are no secrets
Run a command that produces exit code 0 (and aids debugging:)
2023-09-06 09:49:31 +02:00
Simon Hausmann
f6416ce59c Fix missing quotes in shell syntax 2023-09-06 09:31:48 +02:00
Simon Hausmann
06feaa4a9d Improve wasm preview on mobile
Place the preview into an item in a flexbox after the source code, so that it wraps
around on mobile.

Fixes #3389
2023-09-06 09:02:42 +02:00
Simon Hausmann
0fae14754a Prospective fix for nightly failure
Can't use env in the jobs section. Use the workaround google recommends: a separate job and outputs.

Amends df2567ed1f
2023-09-06 09:01:04 +02:00
Simon Hausmann
df2567ed1f ci: don't run vsix or doc publishing without secrets
In forks of the slint repo, those secrets are not presented. The cron schedule however
implies that the job will be run, and
in every for of the Slint repo the nightly
always fails and produces an email.
Stop that :-)
2023-09-05 21:34:45 +02:00
tronical
b8b9db4e42 Bump version number to 1.3.0 2023-09-05 15:46:36 +02:00
Simon Hausmann
32171bc534 Fix version upgrade script to strip component revision from esp-idf component 2023-09-04 13:43:18 +02:00
Simon Hausmann
bf4acc24ca Revert "Prepare for release: add Cargo.lock and set the version number in the docs"
This reverts commit e5c778b920.
2023-09-04 13:40:25 +02:00
Simon Hausmann
c5135ab46c Fix esp-idf component upload
Bump component revision to 1 (from default zero)
2023-09-04 13:31:35 +02:00
Simon Hausmann
58b52d66a3 Adjust dependencies to support our MSRV
Apply the downgrades from ci.yaml manually.

Amends e5c778b920
2023-09-04 10:54:52 +02:00
Simon Hausmann
e5c778b920 Prepare for release: add Cargo.lock and set the version number in the docs
We add the Cargo.lock for the release so that the tagged commit has it,
this will be usefull for the C++ users who build from source with a
tagged version of slint. Because we want to reduce the likelyhood that
they get compilation error in a dependent crate

This will be reverted after the release.
2023-09-04 10:34:41 +02:00
Simon Hausmann
3a55dae0af Bump vtable version 2023-09-04 10:30:10 +02:00
Simon Hausmann
4ed9e9d299 Bump the slint release tag in the esp-idf component next time as well 2023-09-04 10:28:25 +02:00
Simon Hausmann
c92c554da9 Prepare esp-idf component for release
- Remove the alpha suffix
- Use Slint from the release tag not the branch.
  It would be awkward if the 1.2.0 esp-idf component would end up
  using Slint 1.3.0, so let's tie them together for now.
2023-09-04 10:24:50 +02:00
Simon Hausmann
5e9aa8830e Bump Slint version in various doc samples to 1.2.0
Same as commit 2a2e38315e
2023-09-04 10:17:02 +02:00
Simon Hausmann
5a069b08fb Mention GLES requirement for linuxkms 2023-09-04 09:21:45 +02:00
Simon Hausmann
f404e10b4d Shorten linuxkms renderer table a little 2023-09-04 09:17:05 +02:00
Simon Hausmann
e56cac8031
Fix typo 2023-09-02 11:34:44 +02:00
Simon Hausmann
dae978a0f9 Fix HighDPI rendering on Windows when using Qt as default backend
When not explicitly selected, we would construct the Backend struct as-is,
without calling `new()`. Therefore we would
miss the call to ensure_initialized() and
later set the Qt::AA_PluginApplication
application attribute, which screws up rendering.
2023-09-01 11:40:31 +02:00
Simon Hausmann
845e30df60 Prepare ChangeLog for Monday
That way I can also include the correct link in the blog post
2023-09-01 10:17:55 +02:00
Olivier Goffart
95b6eda10b Make sure PLatformError is Send+Sync as it is needed for anyhow 2023-08-31 20:52:10 +02:00
Simon Hausmann
38f8615065 Fix PlatformError compatibility
It was Send before, so try to keep it Send with the new Boxed dyn error, too.
2023-08-31 20:52:10 +02:00
Olivier Goffart
2fa014261a Crater: update urls 2023-08-31 15:57:34 +02:00
Olivier Goffart
1f5da4ad97 Fixes to wasm_preview
- the "preview" command don't contain a "design_mode" arg, but later
   the generated js for the wasm checked that it is a boolean.
 - The url comparison did not work when using the binary lsp and wasm
   preview. Event though the URL string is the same, the object were not
   exactly equals.
 - Fix rust warnings in the wasm lsp build
2023-08-31 14:38:06 +02:00
Tobias Hunger
8dfacf0549 lsp: Be more careful with invalid positions
The interpreter will return 0 offsets for lines and columns and empty file
paths when something goes wrong.

So the LSP needs to be prepared to handle those to avoid a panic.

This patch uses saturating sub to avoid panics and moves the offset
handling for both lines and columns into the same place.
2023-08-31 14:26:19 +02:00
Tobias Hunger
3023393fa1 lsp: Use same conversion from URL to PathBuf everywhere
This makes sure paths match up with each other. Highlighting broke for
me since the paths in the DocumentCache were canonicalized while the path
the LSP wanted the preview to highlight was not.
2023-08-31 13:08:30 +02:00
Olivier Goffart
dac5016771 Warn when using a Path with the software renderer
CC: #2026
2023-08-31 12:37:48 +02:00
Simon Hausmann
2a486edd82 Mark the linuxkms backend as experimental 2023-08-31 11:30:51 +02:00
Olivier Goffart
8f16b519a2 use #repr(uX) instead of repr(C) for fieldless enums
Otherwise the ABI may differ between the C++ and the Rust
2023-08-31 10:22:03 +02:00
Olivier Goffart
f7a44d7dfc Rust docs: make the main page shorter by moving sections in their modules 2023-08-30 18:33:51 +02:00
Simon Hausmann
2b7aa6ba2d Change doc formatting of arguments in callbacks and functions
- Use a single code fence for the entire signature. Some where uses the one, some the other format. This unifies to the single fence that's easy to read and avoids extra visual boxes.
- Removed names from arguments as that's not valid syntax at the moment.
2023-08-30 16:38:25 +02:00
Simon Hausmann
50481e3387 Fix missing backticks in StandardListView::set-current-item docs 2023-08-30 16:38:25 +02:00
Simon Hausmann
98a971666c API changes to ReverseModel and doc fixes
- Add missing documentation to various new functions
- Remove unused `inner_model()` function. We don't have an equivalent in the other model classes. C++ has source_model() though, but we can add that if needed.
2023-08-30 16:36:25 +02:00
Simon Hausmann
9a94c8869e Release esp-idf component once more before 1.2 release
... to catch up with API changes that the platform.cpp required changes to.
2023-08-30 16:32:32 +02:00
Simon Hausmann
e73ad733fc API fixes to the OpenGL texture borrowing API
- Make BorrowedOpenGLTextureOrigin non_exhaustive
- Mark BorrowedOpenGLTextureBuilder::new_gl_2d_rgba_texture as unsafe instead of build(). The former takes the arguments that may be garbage, not the latter.
2023-08-30 16:18:42 +02:00
Olivier Goffart
73ff86cf5a C++: Move the PhysicalRegion in the SofwtareRenderer 2023-08-30 14:59:41 +02:00
Olivier Goffart
932db7ac38 C++: make Platform::duration_since_start non-const and pure
When SLINT_FEATURE_FREESTANDING is set, it must be re-implemented
otherwise the time doesn't pass
2023-08-30 14:59:41 +02:00
Olivier Goffart
c47e6cd029 C++: Api changes in the WindowAdapter
- s/physical_size/size/ (consistant with the slint::Window API)
 - remove const of virtual function  (they don't need to be const and
   make implementation potentially easier)
 - Move the WindowProperties in it
2023-08-30 14:59:41 +02:00
Simon Hausmann
465fe20478 Fix external links from the C++ docs in markdown files
Recgonize the default schemes, otherwise
myst-parser thinks they're internal.
2023-08-30 14:58:31 +02:00
Simon Hausmann
d0fbb3e1a4 doc: Fix links to language specific reference docs in Slint reference
Instead of linking to the latest /docs/cpp, etc., link to /releases/XXX/docs/cpp.

(Converted the getting started to markdown while at it )
2023-08-30 14:55:09 +02:00
Simon Hausmann
f328b394f8 Re-enable docs preview on Safari by default
Each widget has its own page now in the Slint reference, so
load times should be better now.
2023-08-30 14:32:39 +02:00
Olivier Goffart
fd60d08f7b Rename SLINT_TARGET_CARGO_FLAGS to SLINT_LIBRARY_CARGO_FLAGS 2023-08-30 13:44:19 +02:00