Olivier Goffart
c05e63f9da
Auto-completion of the new property keywords and functions
2022-12-08 10:14:54 +01:00
Olivier Goffart
c2895a44af
Update syntax highlight for Functions and in-out things
2022-12-08 10:14:54 +01:00
Olivier Goffart
30a81d856a
documentation: fix formatting of the backend selection
2022-12-08 08:05:27 +01:00
Simon Hausmann
e573f5b9e0
Speed up window resizing with GL on Linux
...
When selecting the egl/glx config, select a configuration that has multisampling disabled,
as opposed to one that maximizes the number of samples per pixel.
This also fixes XIO errors causing the process to abort, when resizing very quickly.
2022-12-07 16:49:57 +01:00
Tobias Hunger
8fe09ca17a
lsp: Fix LSP blocking when run from VSCode
...
GDB claims ther lsp is blocked on the mutex on stdout. So remove the
println! statement that caused this -- it should not be there in the
first place!
2022-12-07 16:42:33 +01:00
Simon Hausmann
1162ebbb79
Reduce the amount of re-creation of cells in repeaters when the model changes ( #1954 )
...
Re-use the cells but mark them as dirty, instead of re-creating them every time.
In the included test-case that provides behavior that's
more intuitive.
2022-12-06 18:43:55 +01:00
Simon Hausmann
958cafc357
Fix build of skia-opengl on macOS and Windows
...
Since commit ea4ad7297b , the metal and d3d
surfaces are built unconditionally when Skia is enabled, which means we
also need to have their dependencies enabled in the "other" skia
feature.
2022-12-06 16:52:45 +01:00
Olivier Goffart
b2e22dc7cd
Apply suggestions from code review
...
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
2022-12-06 14:56:25 +01:00
Olivier Goffart
91dabcbddf
Use functions in our examples, instead of callback
2022-12-06 14:56:25 +01:00
Olivier Goffart
09d6b76914
Documentation for functions
2022-12-06 14:56:25 +01:00
Olivier Goffart
3c5aeb5897
Test for binding loops involving functions
2022-12-06 14:56:25 +01:00
Olivier Goffart
8ab1617545
Tests for functions in components
2022-12-06 14:56:25 +01:00
Olivier Goffart
ed07cd825d
Make functions private by default unless annotated with 'public'
2022-12-06 14:56:25 +01:00
Olivier Goffart
dfdbc942f6
Split Expression::CallbackReference and Expresison::FunctionReference
2022-12-06 14:56:25 +01:00
Olivier Goffart
4672e54f5e
Compiler: make calling functions work
2022-12-06 14:56:25 +01:00
Olivier Goffart
851a910e41
Parser: Parse functions
2022-12-06 14:56:25 +01:00
Simon Hausmann
18bf24e7bf
cleanup: simplify access to the winit window
...
We can now return a reference.
2022-12-06 14:15:56 +01:00
Simon Hausmann
8dd28d232e
Port to new major glutin version
2022-12-06 14:15:56 +01:00
Olivier Goffart
8cf05ddd04
Fix panic in the interpreter when evaluating init in a layout
...
The repeater code already call the init code, so we shouldn't call it
twice.
2022-12-06 13:35:03 +01:00
Olivier Goffart
cd57b67648
ChangeLog entry
2022-12-06 10:35:38 +01:00
Olivier Goffart
fdf5d4c0dd
Fix in/out/private property on global
...
This is technicly a breking change. But this is also a bug and it was only
allowed since 0.3.2, so it is probably fine.
The problem is that any property access to a global was considered as being
local.
Now, change that so that property access to a global object is no longer
local, and other components can't access private property anymore
2022-12-06 10:29:44 +01:00
Simon Hausmann
755cd66398
Revert "Prospective build fix for arm cross build" and "With Rust 1.64 we can use core:ffi types instead of depending on libc"
...
This reverts commit 000d95670b and commit
d764796e0c to fix arm cross build and
x86-64 linux.
Let's use the core::ffi types when fontconfig-sys switches to it.
2022-12-06 09:16:03 +01:00
Simon Hausmann
000d95670b
Prospective build fix for arm cross build
...
Use the `c_char` type that adapts to the signedness
2022-12-06 09:07:48 +01:00
Tobias Hunger
71199fbb16
online editor: Have LSP trigger updates in the Properties View
...
We still get some updates from the editor that we do not really need
anymore, but we also get updtaes from the LSP now.
This fixes e.g. the property value being out of sync right after you
changed it in the property editor.
2022-12-05 15:13:14 +01:00
Tobias Hunger
9cd6c60000
lsp: simplify registration on LSP with properties_widget
2022-12-05 15:13:14 +01:00
Tobias Hunger
6d3506d2d4
online editor: Make the language client handle progress reports
2022-12-05 15:13:14 +01:00
Tobias Hunger
ea24548ee2
lsp: Report progress on file load in WASM, too
2022-12-05 15:13:14 +01:00
Tobias Hunger
59380e8a25
lsp: Improve ProgressReporter API
...
Make finish() consume self.
2022-12-05 15:13:14 +01:00
Tobias Hunger
2c472a34ab
lsp: Reset token on call to finish in ProgressReporter
...
We would send the end token twice otherwise as the Drop trait will send
an end report if none was sent before.
2022-12-05 15:13:14 +01:00
Tobias Hunger
3c05dfe029
lsp: Report that we send progress information
2022-12-05 15:13:14 +01:00
Simon Hausmann
78d070c713
online editor: Fix preview not being visible with Safari
...
A value of "1" for the style property turns into "none" in the computed style, for the canvas element.
Fixes #1945
2022-12-05 14:49:20 +01:00
Simon Hausmann
11f46906a2
Centralize rust-version in Cargo.toml
...
Require 1.64 in the workspace and inherit the setting in package
Cargo.toml files.
2022-12-05 12:39:14 +01:00
Simon Hausmann
d764796e0c
With Rust 1.64 we can use core:ffi types instead of depending on libc
2022-12-05 10:33:50 +01:00
Simon Hausmann
7122d22c88
janitor: use the new default attribute for enums
2022-12-05 10:20:39 +01:00
Simon Hausmann
7e77a2a4cc
Bump MSRV to 1.64
...
... due to rust-skia bindings requiring a feature (ffi related).
2022-12-04 19:39:35 +01:00
Simon Hausmann
2dbabe1d86
Fix the MSRV CI check
...
Pass the expected toolchain version to the action
2022-12-04 19:39:35 +01:00
Tobias Hunger
24500fbf6b
online editor: Explain how preview scaling works
2022-12-02 17:14:05 +01:00
Tobias Hunger
f069d066bd
online editor: Add zoom level to preview widget
...
Add a set of widgets to control the zoom level to the preview widget.
2022-12-02 17:14:05 +01:00
Tobias Hunger
a30c921983
online editor: Add zoom level to preview
2022-12-02 17:14:05 +01:00
Tobias Hunger
765b59ec48
online editor: Fix icons
2022-12-02 17:14:05 +01:00
Tobias Hunger
4d88e59675
online editor: Improve positioning of preview area
...
Work around the scrollbar not reaching the entire preview canvas when it
is overflowing.
References #1762
2022-12-01 16:56:40 +01:00
Tobias Hunger
b6f36e7ce1
lsp: Add removeBinding command
...
Add a command to remove a proerty binding from an element.
2022-12-01 14:04:30 +01:00
Tobias Hunger
3a601ba6ef
lsp: Add function to right extend around a token
...
... collecting white-space and comments and associating that with the
token.
2022-12-01 14:04:30 +01:00
Tobias Hunger
8adf03945c
lsp: Look for comments to remove together with a property
...
Look for leading comments that probably go with a property and add those to
the deletion range.
2022-12-01 14:04:30 +01:00
Tobias Hunger
11150d93ed
lsp: Add a delete_range to property information
...
Add a field to report the range covered by an expression so that it can
get deleted.
2022-12-01 14:04:30 +01:00
Olivier Goffart
20bc567b6d
Don't match builtin type purely on it's base type name
...
Make sure this is the actual builtin type we are looking at and not a
re-defined component
Doesn't work for ListView unfortunately because ListView is not a
builtin type
CC #861
2022-12-01 12:56:59 +01:00
Tobias Hunger
0dee4fa486
lsp: Add option to report progress information
2022-12-01 11:15:57 +01:00
Olivier Goffart
6d0a3f2f9d
swrenderer: Fix text hacing the alpha multiplied twice
...
and do some renaming
2022-11-30 16:49:23 +01:00
Olivier Goffart
830e33876f
swrenderer: Fix drawing of images
...
There was some confusin on the meaning of the alpha and colorize and how
it is computed for AlphaMap images
2022-11-30 16:49:23 +01:00
Olivier Goffart
1aaab99666
Upgrade to rp-hal 0.6.1 to fix the CI
...
Note that this is actually using a marge of v0.6.1 and the branch in https://github.com/rp-rs/rp-hal/pull/457
2022-11-30 14:07:44 +01:00