Nigel Breslaw
482308f5da
Add Math.atan2 to the inbuilt math function
...
Math.atan2(y, x) -> angle
2024-08-30 09:55:10 +02:00
Tobias Hunger
90e55bd29f
compiler: Fix a couple of clippy issues
...
Nothing major, nothing controversial, just killing time
while waiting on CI.
2024-08-26 08:45:52 +02:00
Olivier Goffart
686f5e43e2
Widget style: simplify -light/-dark handling
...
Instead of having all style duplicated and re-using a base, we just hack
into the funciton that queries the dark/light theme based on the style
suffix known at compile time.
This removes one of the problem that happens when trying to work on the
widget style with the extension, as it relies on include path hacks
2024-08-20 16:55:15 +02:00
Olivier Goffart
8a0df2b3a5
Rename NumValueExpression -> NumberWithUnitExpression
2024-08-15 14:52:13 +02:00
Olivier Goffart
9b71cf1a36
Math postfix member functions on numbers
...
Closes #5328
2024-08-15 14:52:13 +02:00
Simon Hausmann
6d7cc521fc
Replace compiler dependency on css-color-parser crate
...
The crate uses an old version of lazy_static that doesn't seem to reliably compiler with newer versions of Rust.
This is a partial fix for #5702 as all the compiler needs is the named color table.
2024-07-29 13:13:53 +02:00
Olivier Goffart
445802c46d
date_time: simplification and cleanups
2024-06-06 09:03:50 +02:00
Olivier Goffart
3da0ee5bb9
DatePicker: Logic in C++
...
Had to simplify a bit the rust logic to make it work
2024-06-06 09:03:50 +02:00
Florian Blasius
973ecac989
DatePicker: finished features
2024-06-06 09:03:50 +02:00
Florian Blasius
3ccee816be
Added TimePicker widget ( #5251 )
2024-06-05 15:23:06 +02:00
Simon Hausmann
73b5136f98
WIP: Search by qualified element id
2024-06-05 01:29:58 -07:00
Aurindam Jana
3523e86359
Simplify commercial license ( #3063 )
...
Base the commercial license on the Royalty-free license adding clauses pertaining to the fees.
2024-05-31 14:06:17 +02:00
Aurindam Jana
9a3aa265d5
Update Royalty-free license ( #5257 )
...
Add clarification that Application may not expose Slint APIs.
2024-05-31 10:53:19 +02:00
Olivier Goffart
61233d8f6b
Only mark builtin StyleMetrics as deprectated.
...
User defined component or global named StyleMetrics shouldn't be deprecated
2024-05-28 13:45:56 +02:00
Olivier Goffart
0929e3dfc1
Slint: make the abs work with unit types
2024-05-08 19:04:22 +02:00
Tobias Hunger
2e3b00e38e
janitor: Fix some clippy warnings pre-release
...
Nothing that should be controversial, but the
`internal/compiler/builtin_macros.rs` could point to a thinko in the original
commit.
2024-05-06 16:47:14 +02:00
Olivier Goffart
0f05089d5e
Polish the C++ and Rust HSV API
2024-04-15 18:18:00 +02:00
Olivier Goffart
f1192673cb
Slint: use to-hsv() to access hsv color
2024-04-15 18:18:00 +02:00
Luke D. Jones
0b1ec5e4c9
Convert to struct field access and make HsvColor public
2024-04-15 18:18:00 +02:00
Luke D. Jones
d4a3f77877
feat: color: add HSV methods to slint
2024-04-15 18:18:00 +02:00
Simon Hausmann
ae2e0197f8
Deprecate the use of StyleMetrics for users of the public API ( #4947 )
2024-04-15 17:07:05 +02:00
Aurindam Jana
0cfeec1a31
Update Slint Community License ( #4994 )
...
Updated the version from 1.1 to 1.2
Renamed the header to "Slint Royalty-free Desktop, Mobile, and Web Applications License"
Added definition of "Mobile Application" and grant of right
Moved "Limitations" to 3rd section and "License Conditions - Attributions" to 2nd section
Added flexibility to choose between showing "MadeWithSlint" as a dialog/splash screen or on a public webpage
Moved the para on copyright notices to section under "Limitations"
2024-04-15 15:18:55 +02:00
Simon Hausmann
68083243b2
Add an in-out boolean color-scheme property to Palette ( #4701 )
...
This allows applications to force dark/light mode, as well as determine
which mode is active.
2024-03-26 15:44:22 +01:00
Olivier Goffart
b844f76842
Add test and fixup color red/green/blue fields
2024-03-12 11:36:30 +01:00
Luke D. Jones
8c60cc74be
feat: color: add channel properties to color
...
Add extra properties to the `color` type.
- `red`
- `green`
- `blue`
- `alpha`
2024-03-12 09:42:30 +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
Tobias Hunger
2ad8774a61
Add clamp function to slint language
2023-11-22 12:27:54 +01:00
Ken Carpenter
b20536131f
Add more easing formulas ( #3812 )
...
Closes #2655
2023-11-03 09:20:44 +01:00
Olivier Goffart
85ca10d32e
Disallow access to internal globals (NativeStyleMetrics and SlintInternal)
...
It only stay accessible in our builtin styles
Fixes #3793
2023-10-28 16:07:38 +02:00
Olivier Goffart
12cd8e71f1
WIP: some polish over the winit update to 0.29
2023-10-23 14:22:48 +02:00
Olivier Goffart
ad389aa4eb
linuxkms: Implement keyboard input and clamp mouse
...
Unfortunately, this is currently not mapped to the right keyboard layout
Also keep the mouse clamped in the visible area.
And make it start in the middle of the screen.
2023-07-31 17:27:53 +02:00
Aurindam Jana
5a4a7fee63
Update royalty free license to 1.1 ( #2994 )
2023-07-10 10:12:11 +02:00
Tobias Hunger
e02c360000
Clippy polish
2023-06-28 14:22:30 +02:00
Olivier Goffart
11dea135f7
Domain: slint-ui.com -> slint.dev
2023-06-16 10:55:08 +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
5599bd44e0
Remove Color::opaque
...
It is not a right name and i don't think it is a so common operation
2023-06-02 17:02:08 +02:00
Olivier Goffart
4845241ebf
Rename translucent to transparentize and mixed to mix
2023-06-02 17:02:08 +02:00
Arthur Araruna
64ad1ce357
Add some color and brush manipulation funcs ( #2565 )
...
The added functions enable mixing colors and manipulating the opacity
of colors and brushes.
They enable the behavior of some of the available functions from SASS and are
added for future use for adding the Adwaita style (future PR).
2023-06-02 17:02:08 +02:00
Olivier Goffart
5c4a1746d4
LSP: fix completion of callback arguments
2023-05-03 09:09:01 +02:00
Olivier Goffart
a1ea00553f
Compiler: hint when an id has the same name as a property or enum value
2023-04-18 16:16:31 +02:00
Olivier Goffart
208d89c1de
LSP: Don't auto-complete reserved properties or sub-elements for globals
2023-04-05 20:05:09 +02:00
Tobias Hunger
3ac01c3f07
clippy: Fix clippy warnings
2023-03-09 09:35:29 +01:00
Olivier Goffart
5bb84c1d69
Remove deprecated Keys
enum in slint language
2023-01-26 15:35:18 +01:00
Olivier Goffart
8fc7c2dafc
Error when mixing purity in callback aliases
...
Also adjust the way we report error while infering to avoid double
reporting errors
2022-12-22 00:26:27 -08:00
Olivier Goffart
1cbd61145e
WIP: pure qualifier for callback and functions
2022-12-22 00:26:27 -08: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
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
Olivier Goffart
443a5f7657
Center element by default in their parent with the new syntax
2022-11-15 17:33:27 +01:00
Florian Blasius
61c39b5fa1
Add support for dispatching key events through the public platform API
...
This change adds `KeyPress` and `KeyRelease` variants to the
`WindowEvent` enum, along with the new `slint::Key` enum, that allows
encoding keys.
2022-11-15 10:34:17 +01:00