Commit graph

8047 commits

Author SHA1 Message Date
Olivier Goffart
81cb89d374 C++: fix including the generated file in several translation units 2023-02-17 16:42:40 +01:00
Simon Hausmann
155b1443e2 Add support for reacting to dark/light mode theme changes with winit
On macOS and Windows, use winit's `Window::theme()` instead of
dark-light, to detect the theme.

Always react to WindowEvent::ThemeChange. It's delivered on macOS,
Windows, and the web.
2023-02-17 16:11:44 +01:00
Simon Hausmann
c3c98d928c Fix panic when minimizing window on Windows with winit
Fixes #2197
2023-02-17 15:59:02 +01:00
Olivier Goffart
ed51f6b7b6 Femtovg backend: fix text_input_cursor_rect_for_byte_offset for the last glyph
It was on the wrong line if not a \n, and on the wrong position if a \n
2023-02-17 15:51:14 +01:00
Olivier Goffart
aa2d5fa324 We must update animations before the timers
In case a timer start an animation, the starting time need to be correct
2023-02-17 15:27:43 +01:00
Olivier Goffart
792a5bbd23 Janitor: Update esp32 dependencies
(I did compile the code for the s3 box, but did not try it as i don't
have the hardware)
2023-02-17 15:27:43 +01:00
Simon Hausmann
3c686047cd Silence debug output on macOS and Windows when selecting text
Use a truly silent no-op clipboard context.
2023-02-17 15:27:12 +01:00
Florian Blasius
1b04601750
std-list-view: bring selected into view (#2246)
* std-list-view: bring selected into view

* Update internal/compiler/widgets/fluent-base/std-widgets-base.slint

Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>

* code review

---------

Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
2023-02-17 13:50:09 +01:00
Simon Hausmann
aba5797eaa C++ docs: Elaborate a little on the argument to Window::set_rendering_notifier 2023-02-17 11:12:54 +01:00
Simon Hausmann
b888870705 CI: Don't run apt-get upgrade
Sometimes updates to packages break in the GH provided virtual machines, as
witnessed in current CI breakage. Let's let GH decide when to install security updates.
2023-02-17 09:45:45 +01:00
Olivier Goffart
5146c52d20 Flickable: Shift + mouse scroll reverts scroll dirrection
Closes #2228
2023-02-16 14:01:34 +01:00
Simon Hausmann
aee97b475e janitor: remove dead CMake code 2023-02-16 13:53:20 +01:00
Tobias Hunger
ef28eb80c4
docs: Split up concepts.md in the langref concepts section 2023-02-16 11:25:06 +01:00
Tobias Hunger
582b07e61c
docs: Move langref concepts into a separate folder 2023-02-16 11:25:02 +01:00
Simon Hausmann
b8a997ce6b Add noto fonts to the torizon container
This fixes missing emojis and special characters, and generally makes sense for such a container.
2023-02-16 10:51:38 +01:00
Olivier Goffart
8450e01a3f
Change the name of the compat feature (#2230)
And remove the compat-0-2-0 and compat-0-3-0 features
2023-02-16 09:40:44 +01:00
Olivier Goffart
361526fb33 Update resvg dependency 2023-02-16 09:03:22 +01:00
Olivier Goffart
fd6c80a590 Set MSRV to 1.66 2023-02-16 09:03:22 +01:00
Olivier Goffart
8934bf3bf5 Layouting: When propagating constraint to parent, use the explicit constraints...
in addition to the implicit constraints

Finishes #783
2023-02-15 17:07:33 +01:00
Tobias Hunger
1a31c9a50b
docs: Polish the C++ docs (#2229) 2023-02-15 15:47:45 +01:00
Tobias Hunger
255fe56c94
online_editor: Fix fake baseURI 2023-02-15 11:43:53 +01:00
Florian Blasius
997344b732
desktop window, tab widget, dashbaord (#2237)
* desktop window, tab widget, dashbaord

* replace logo
2023-02-15 11:28:13 +01:00
Olivier Goffart
5b3cde87ab Update dependencies 2023-02-15 10:28:02 +01:00
Olivier Goffart
03e9edee64 Fix compiler panic when an component's base is not inlined
An element with children must be fully inlined or the children array
can't be easily computed.
But the code wouldn't work if the base of a component was not inlined
2023-02-15 09:20:12 +01:00
Florian Blasius
f52cee154f
balance chart, balance page (#2236) 2023-02-15 09:19:58 +01:00
Tobias Hunger
b33fd32002 online_editor: Fix firefox
Firefox does not handle modules in web workers yet, but that is what we
asked vite to build (to work around a compatibility issue after
upgrading to vite 4). So Chrome worked, but Firefox did not.

This PR adds a pretty ugly work around to that problem.

The good news is: Firefox will apparently be able to handle modules in
web workers starting with 111, so let's hope we do not need this for too
long!
2023-02-14 20:53:36 +01:00
Olivier Goffart
41157b9984 Fix visible property on the root of a component
Just like opacity and other properties, it needs to prevent inlining.

And also add the same warning as for opacity if it is used on the root
(the Window)
2023-02-14 13:28:54 +01:00
Olivier Goffart
4f00f268a5 Make the old syntax a warning 2023-02-14 12:38:39 +01:00
Olivier Goffart
e57627d535 Use the new syntax in more tests
That are failing otherwise as there would be a warning
2023-02-14 12:38:39 +01:00
Florian Blasius
6f3dfc992f
energy_mng: weather page and bar tiles (#2225)
* weather page
* bar tiles
2023-02-14 06:47:08 +01:00
Olivier Goffart
e557ba5eed Exaples: Use the new syntax for the iot-dashboard and imagefilter 2023-02-13 17:53:23 +01:00
Olivier Goffart
9e47e5648f
Update CHANGELOG.md
Add the TextEdit changes
2023-02-13 15:35:02 +01:00
Tobias Hunger
a454ffe8f9 tree-sitter: Polish queries 2023-02-13 09:22:42 +01:00
Olivier Goffart
ca7b2e0bb8 Harmonize style properties 2023-02-10 16:49:25 +01:00
Olivier Goffart
70f8c45d26 Add a test that styles are in sync
Closes #2051
2023-02-10 16:49:25 +01:00
Olivier Goffart
55ed3bc1f5 Compiler: use the new syntax for builtins.slint 2023-02-10 16:22:52 +01:00
Tobias Hunger
671d22d762
tools: Tree sitter update for 1.0 (#2144)
Make our tree-sitter parser handle all the 1.0 syntax.
2023-02-10 14:46:47 +01:00
Simon Hausmann
e09943ead5
Improve error message when trying to create a two-way binding to model data
Closes #2186
2023-02-10 13:13:15 +01:00
Tobias Hunger
e1e4be2497
Use sphinx to generate the Slint language reference (#2218)
* docs: Move the langref to sphinx

* docs: Use sphinx to build nighly doc snapshot of langref
2023-02-10 11:51:36 +01:00
Olivier Goffart
fb8a7fb1e5 winit backend: fix compilation with wayland but not x11 2023-02-10 11:18:05 +01:00
Olivier Goffart
6889dfa5f5 Rust: Make new(), run() and show() report errors from the backend
Fixes #2198
2023-02-10 05:00:03 +01:00
Tobias Hunger
e8ee468cc6 xtask: Sort enums when generating enum docs
It's much easier for humans to find entries that way!
2023-02-09 18:31:34 +01:00
Simon Hausmann
02694f4992 Replace unwraps in compiler glyph embedding with diagnostics
As discussed with Olivier, fatal diagnostics are better than a panicing
compiler.
2023-02-09 18:16:29 +01:00
Tobias Hunger
e64e15e277 docs: Modernize the tutorials for 1.0 2023-02-09 16:59:25 +01:00
Simon Hausmann
59e0723793 Improved fix for panic when using OpenGL with the winit backend on Linux
Replace the patch with use of the glutin API as advised upstream (and
also implemented in glutin-winit).

Closes #2215
2023-02-09 16:16:36 +01:00
Simon Hausmann
175a23043d Patch in PR for glutin to fix EGL initialization on Linux
cc #2215
2023-02-09 15:26:30 +01:00
Simon Hausmann
476300ded7 Prospective fix for preview panicing on Linux v2
Avoid unwrap in the display/context selection try function.
2023-02-09 14:24:20 +01:00
Simon Hausmann
1bd0e479c7 Declare the Slint VS code extension as stable
... and not preview anymore, for releases.
2023-02-09 10:22:34 +01:00
Simon Hausmann
e8439061e8 Prospective fix for vscode extension preview not working on Linux
The CI build vsix panics on line 84 in glcontext.rs. There's no unwrap()
there but there's one nearby. I wasn't able to reproduce this with a
local build, so this is a prospective attempt, assuming that this is due
to the attempt of glx-over-egl display configuration finding.
2023-02-09 09:45:54 +01:00
Olivier Goffart
f6e4f16a14 LSP: Dont detect slint::slint! as slint macro in comments or stings
We already detected that `slint!` in a comment should not be interpreted
as a slint macro, but that detection failed for `slint::slint!` or if
`slint` was twice in the same line.
2023-02-09 08:52:51 +01:00