Olivier Goffart
fdec5960bd
Support for @rust-attr on enums
2023-06-19 22:40:49 +02:00
Olivier Goffart
11dea135f7
Domain: slint-ui.com -> slint.dev
2023-06-16 10:55:08 +02:00
Tobias Hunger
04d1229685
Fix licnese information using xtask
2023-06-16 09:14:20 +02:00
Aurindam Jana
039e54a5de
Add royalty free license to files except examples and docs ( #2888 )
2023-06-15 11:20:50 +02:00
Olivier Goffart
af604a29b4
Ensure there are no duplicated enum values
2023-06-12 13:02:14 +02:00
Olivier Goffart
e97a2e8229
Translations: support context
2023-06-06 14:48:48 +02:00
Olivier Goffart
9b3ccd3dc3
Check validity of the format string at compile time
2023-06-05 16:34:59 +02:00
Olivier Goffart
dcd8450dfa
WIP: start working on translations: @tr()
...
This commit just do the parsing of the @tr macro.
2023-06-05 16:34:59 +02:00
Olivier Goffart
6441968a43
Janitor: Remove trailing spaces in most files
2023-05-04 08:14:28 +02:00
Olivier Goffart
d881a4fb66
Syntax tests: move some tests to another folder
...
tidy a bit the basic directory
2023-05-02 13:06:50 +02:00
Tobias Hunger
bbdd6aeab7
compiler: Ignore leading whitespace when parsing
...
... and update all out test cases accordingly.
2023-04-26 17:22:13 +02:00
Olivier Goffart
875a7ea179
Parser: Nicer error when extra top-level semicolon
...
Recover from extra semicolon
2023-04-17 15:13:20 +02:00
Olivier Goffart
82ae83ce8c
Parser: don't have the whitespace as part of an expression
...
That way the error for an expression is at a better location, and
this also prevent the formater that removes space in expressions to
remove the spaces before the expression that shouldn't be removed
2023-04-14 17:46:19 +02:00
Simon Hausmann
d87af7e917
Fix panic when binding Path's commands property to a model entry's field
...
Fixes #2466
2023-04-03 15:25:13 +02:00
Olivier Goffart
3267d68541
Turn warning about non-existing image into error
...
This is only an error if we embedd recources.
(When using absolute path it is not an error/warning)
2023-03-27 11:14:25 +02:00
Olivier Goffart
1089d29ebb
Make Empty not fill the parent by default
...
Unless `preferred-*:100%` is set
Part of #2284
2023-03-24 11:15:05 +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
7290049a17
Fix panic parsing invalid linear grandient
...
If the last position expression is invalid due to an unrelated error,
the code that tries to do the interpolation was panicking with the
message "The last should never be invalid". (Because it assumed that
invalid meant that it was not set, and we added a 100% for that last
one if it wasn't set. But if it is set and invalid, this would error.)
2023-01-27 13:56:48 +01:00
Simon Hausmann
9180704d70
Warn about components that are neither used nor exported
2023-01-26 15:52:40 +01:00
Simon Hausmann
24dcef5fed
First stage of cleaning up the export handling of the slint root component ( #2095 )
...
We implicitly export the last component of a .slint file to the generator.
Issue a warning when that happens and suggest to export it explicitly.
2023-01-23 15:19:49 +01:00
Simon Hausmann
629c7ed80e
Remove undocumented and dysfunctional PathLayout
...
This type is poorly implemented and not documented. Let's remove it for now.
It shall remain available in the git history in the event of a resurrection.
2023-01-21 13:10:19 +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
Olivier Goffart
395532cebd
Forbid former transitions declaration with the new syntax
2022-11-22 15:16:54 +01:00
Simon Hausmann
907b58161c
Add support for invoking an init callback on component and element construction
...
This enables imperative code to be run. To be used sparingly :-)
2022-11-17 10:12:08 +01:00
Simon Hausmann
7be00f6d60
Improve error message when a property declaration clashes with a callback
...
(also continue, don't allow the declaration to proceed)
2022-11-16 09:46:40 +01:00
Simon Hausmann
e6bd9dc8c4
Improve error message when a callback clashes with a property
...
(also continue, don't declare the the callback anyway)
2022-11-16 09:46:40 +01:00
Simon Hausmann
9bb9ac3c39
Disallow callback overrides as well
2022-11-16 08:56:30 +01:00
Simon Hausmann
27db2bdcc6
Disallow duplicated callback declarations
...
A duplicated callback would silently overwrite the previous declaration,
which is counter-intuitive.
2022-11-16 08:56:30 +01:00
Olivier Goffart
53090ab489
Forbid usage of @children in repeated or conditional element
...
It leads to compiler panic, or errors in the generated code.
2022-10-31 14:13:42 +01:00
Olivier Goffart
28ae8f7bc4
Refactoring: split ElementType away from the types used as property type
...
These are two different concept, and it is confusing to keep them in the
same enum
We want to support component without any base element, and Void is
already used for global component, so do this refactoring before
2022-10-26 14:50:44 +02:00
Olivier Goffart
6d12b276a9
Polish of the rotation feature
...
- Add a check that this only Applies to Image element without children
- Default the origin to the center of the Image
- Add docs and test
cc: #1481
2022-08-30 12:10:42 +02:00
Olivier Goffart
b4ebd88d35
Implements @radial-gradient(circle, ...)
...
Only the circle is implemented so far.
Part of #263
2022-05-19 14:07:20 +02:00
Olivier Goffart
6c7a7aed0e
Error out when a PopupWindow is in a if
or for
...
instead of panicking
We need to mve stuff in the parent element and that doesn't work if
it is a repeated element. Also there would not be ways to call show
on it anyway.
Fixes #1079
2022-03-21 12:50:49 +01:00
Olivier Goffart
7d6c1f375a
Properly error out when element type are used within composite types
...
Fix #1021
2022-03-09 09:22:27 +01:00
Tobias Hunger
4230ac2572
Update copyright information to reflect name change
...
Also run resue over the codebase and fix complaints from that tool.
2022-02-09 10:27:47 +01:00
Olivier Goffart
00ff5e21a7
Update git repository URL
2022-02-08 08:26:21 +01:00
Olivier Goffart
d4c1130130
Rename more occurences
2022-02-02 17:19:31 +01:00
Olivier Goffart
0c0a783095
Rename all our .60 files to .slint
2022-02-02 10:05:45 +01:00
Olivier Goffart
0308f86cd4
Rename sixtyfps_widgets.60 to std-widgets.slint
2022-02-01 18:58:54 +01:00
Tobias Hunger
e6b24bceec
[reorg]: Set up and populate the internal
directory
...
Move "internal" crates into the `internal` directory. This first batch
includes most of sixtyfps_runtime but leaves the rendering backends
alone for now.
pre-commit applied some cleanups to the moved files:
- Consistent newline at end of file policy
- trimming trailing whitespace
- Formatting Cargo.toml files.
2022-01-31 16:00:50 +01:00