Commit graph

10295 commits

Author SHA1 Message Date
Tobias Hunger
585e293a6a interpreter: Hide build_from_versioned_source behind feature flag 2023-12-18 16:01:59 +01:00
Tobias Hunger
d785f2d5df compiler: Store an optional version number with the document
A None value means the file on disk is the golden version.

We have an editor, the LSP and the preview that all need to at least
notice when they have newer data then their peers. So IMHO it makes
sense to have an optional document version around.

The language server protocol makes use of a version number already. This
patch moves that code into the compiler so that it is stored with the
actual data getting versioned.
2023-12-18 14:21:50 +01:00
Tobias Hunger
dc536ac599 cargo.toml: Sort workspace dependencies 2023-12-18 14:21:50 +01:00
Olivier Goffart
4484fe647b Fix wrongly optimized properties with aliases
If we don't see that a native property is modified, it could get inlined
and we wouldn't detect changes

Fix #4072
2023-12-18 12:22:20 +01:00
Noah Sweilem
4ca5afc710
Implement colorize-icon for NativeButton (#4167)
Fixes #4159.

Co-authored-by: Florian Blasius <florian.blasius@slint.dev>
2023-12-18 09:19:09 +01:00
Noah Sweilem
1ddddf1081
Qt backend: use QObject::deleteLater() when destroying popup QWidget (#4168) 2023-12-18 09:03:39 +01:00
Simon Hausmann
c04298647e Skia: Fix OpenGL rendering on devices that don't support GLES 3.0
Fall back to a GLES 2.0 context. After commit 2329bf9eb1 we bumped the minimum to 3.0, but that breaks
rendering on the stm32mp157 with linuxkms.
2023-12-15 16:48:23 +01:00
Update Translations Bot
393c5de1df Update Translations: extract strings 2023-12-15 03:03:51 +00:00
Simon Hausmann
18c5b1ebea doc: Fix link from Rust API docs to Slint language docs for singletons
Fixes #4158
2023-12-14 13:41:25 +01:00
Simon Hausmann
cdc2ccec3b Fix missing types from Node.js API docs
Commit 84fd6dc08c changed the import
from "rust-module" to "rust-module.cjs", which unfortunately broke
typedoc's visibility into the types. Revert back to using the import
without extension. With the given tsconfig files that works now and
typedoc publishes the docs for the re-exported types again.

Fixes #4153
2023-12-14 13:16:00 +01:00
Florian Blasius
e587c09d9c
Added colorize-icon to Button (#4152)
Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
2023-12-14 12:07:55 +01:00
Simon Hausmann
75f24163ed C++: Added ComponentInstance::definition() getter to retrieve the ComponentDefinition for an instance
Fixes #4087
2023-12-14 07:43:29 +01:00
Update Translations Bot
d104238cac Update Translations: extract strings 2023-12-14 03:04:04 +00:00
Simon Hausmann
55a4893a51 Fix publishing of scoped binary package
It's not public by default
2023-12-12 22:37:43 +01:00
Olivier Goffart
5d4c390b0f
Compiler: Error when assigning to compile time properties
Some property need to be known at compile time. We already had checks
that the binding is a compile time constant, but there was no check to
prevent, say

    self.row = 42;

which wouldn't work or could even cause panic or miscompilation of
generated code

Closes #4037
2023-12-12 21:51:56 +01:00
Simon Hausmann
e2f65ed1c7 Attempt to eliminate redundant env declarations 2023-12-12 21:48:22 +01:00
Simon Hausmann
4f741f92c5 Fix publish step
Make version variable accessible
2023-12-12 21:45:11 +01:00
Simon Hausmann
ebc3c251f4 Fix npm publish
The command doesn't take multiple files :(
2023-12-12 21:27:34 +01:00
Simon Hausmann
b64de8ead8 Exclude npm package tarballs from ... npm package tarballs 2023-12-12 21:10:00 +01:00
Simon Hausmann
940430bc23 Fix npm install of Node.js smoke test 2023-12-12 20:49:58 +01:00
Simon Hausmann
d1c9fabbfc Fix adding of optional dependency to binary package for main Node.js package 2023-12-12 20:33:53 +01:00
Simon Hausmann
696654f784 Fix GH action artifact upload path for Node.js binary package 2023-12-12 20:17:42 +01:00
Simon Hausmann
deb6cbcf0f First package version of binary node package 2023-12-12 19:53:46 +01:00
Simon Hausmann
95acc355dc Fix application of npm version override
Use the right variable :)
2023-12-12 19:36:39 +01:00
Simon Hausmann
da3e267154 janitor: fix npm version job output propagation 2023-12-12 15:46:42 +01:00
Simon Hausmann
f07f4359d9 janitor: prospective fix for local npm binary package installation in CI build 2023-12-12 15:21:55 +01:00
Simon Hausmann
f768e84db1 janitor: Use the right move command on Linux 2023-12-12 14:56:57 +01:00
Simon Hausmann
cca6081d01 doc: Simplify Node.js test driver instructions
tests/driver/nodejs/nodejs.rs runs npm install --ignore-scripts
and npm run build:debug before running the tests, so no extra
steps should be needed.
2023-12-12 14:37:32 +01:00
Simon Hausmann
a3407df00e Try to publish x64-linux binaries for slint-node
Build the npm package in a separate job, pull it all together in the final job, and publish from there.
2023-12-12 14:34:17 +01:00
Simon Hausmann
78b6c8e02c Prepare for fetching slint npm binary packages from the @slint-ui/slint-ui-binary-* scope
That way we keep things clean on the top-level.
2023-12-12 14:34:17 +01:00
Simon Hausmann
8c1c87a600 Add support for building on demand
If binary packages are installed, then loading rust-module.cjs will work and
we don't need to do anything.
Otherwise, fall back to building.
2023-12-12 14:34:17 +01:00
Olivier Goffart
6ebfad14db Fix panic in the interpreter when using visible in a ListView
This doesn't solve the issue #2537, but at least prevent the panic

Drive by change to fix compile when a struct is named `Box`
2023-12-12 14:01:55 +01:00
Simon Hausmann
8d19426723
linuxkms: decouple event loop from window adapter (#4144)
- Allow for the event loop to run before creating the window adapter
- Keep the loop running if requested
2023-12-12 13:06:36 +01:00
Simon Hausmann
85fea499ed doc: Separate groupbox docs into a file of its own
That was probably an oversight
2023-12-12 09:26:30 +01:00
Simon Hausmann
89bd7dc38b Build the lsp binaries for embedded devices with linuxkms support 2023-12-11 17:36:17 +01:00
Simon Hausmann
08bf6be341 Build the cross binaries with the linuxkms backend without libseat
(libseat is too new for the images we use)
2023-12-11 17:36:17 +01:00
Simon Hausmann
c1841fdfbe Add support for compiling the linuxkms backend without libseat support 2023-12-11 17:36:17 +01:00
Simon Hausmann
fb41ccf183 Fix build of cross Docker images
Disable the interactive debconf frontend.
2023-12-11 16:00:10 +01:00
Simon Hausmann
7b132cdf35 Install libgbm-dev in the cross containers
Another required dependency for linuxkms backend builds
2023-12-11 15:58:40 +01:00
Florian Blasius
6da8120dfa
added palette global (#3984)
* Update docs/reference/src/language/builtins/globals.md

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

* Update docs/reference/src/language/builtins/globals.md

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

* Update docs/reference/src/language/builtins/globals.md

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

* Update docs/reference/src/language/builtins/globals.md

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

* Update docs/reference/src/language/builtins/globals.md

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


---------

Co-authored-by: Florian Blasius <florian.blasius@slint-ui.com>
Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
Co-authored-by: Florian Blasius <flovansl@fedora.fritz.box>
2023-12-11 14:44:05 +00:00
Simon Hausmann
5d9f824d90 Add libinput-dev to the docker containers used for cross builds 2023-12-11 15:25:35 +01:00
Olivier Goffart
a94148c12c Interpreter: fix panic when a custom enum has the same name as a builtin one
As seen in https://github.com/nununoisy/gb-presenter-rs/blob/v0.6.0/src/gui/slint/main.slint#L6
2023-12-11 13:06:10 +01:00
ogoffart
b081c489d6 Bump version number to 1.4.0 2023-12-11 11:21:37 +00:00
Tobias Hunger
9737720cf2 touch-area: Trigger pointer-evnet on mouse move
Trigger the `pointer-event` callback on mouse move. This is of "kind"
Move and the mouse button will always be `Other`, but at least the mappings
will be correct:-)

Closes: #2770
2023-12-11 09:07:44 +01:00
Tobias Hunger
b12c35d877 LSP: Improve automatic insertion of import identifiers on completion
Insert before the last whitespace. Adding Bar into `import { Foo } from
"..."` looks like this:

```slint
import { Foo , Bar} from "..." // old
import { Foo, Bar } from "..." // new
` ``
2023-12-11 08:29:42 +01:00
Tobias Hunger
9fe53ae966 README: Move the MadeWithSlint gallery up right below the project
description

Remove instructions on how to add your project: That is pretty obvious
on the website already, so I think it's not needed to repeat it in the
project readme.
2023-12-11 08:28:45 +01:00
Tasuku Suzuki
be87ff3950 pico_st7789: Fix typo 2023-12-10 11:54:27 +01:00
MicroBlock
003e177ef7 docs: fix winit link 2023-12-09 09:10:49 +01:00
Update Translations Bot
711eda87ad Update Translations: extract strings 2023-12-09 03:04:06 +00:00
Olivier Goffart
63d199a728 Rust&C++: Fix Return value of complex expression
We were using the has_value of the previous expression of a sequence of
expression, instead of using the last expression type to know if there
is a value.

Fixes #4070
2023-12-08 17:28:38 +01:00