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
Olivier Goffart
2ceafc6392
New syntax: Make it an error to set the value of a builtin output property
...
With the old syntax, this becomes a warning
2022-11-01 12:51:45 +01:00
Simon Hausmann
ab1341878f
Make SlintInternal.dark-color-scheme a property instead of a function ( #1790 )
...
That's a more idiomatic API - the compiler can map the lookup straight
to a function call.
2022-10-28 14:20:20 +02: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
0ba8f58076
New syntax: New lookup rules for unqualified identifier
...
Instead of looking up any property in `self` and `root`, only resolve
the properties in scope declared in the current component.
2022-10-20 16:40:29 +02:00
Olivier Goffart
9518e7184d
Check access rights when accessing properties within expression
2022-10-20 08:02:26 +02:00
Olivier Goffart
c1f4f4e96b
Start working on input/output properties
2022-10-20 08:02:26 +02:00
Olivier Goffart
d2af9e3fc8
syntax_updater: Implement a way to fully qualify all expressions
2022-10-20 08:02:26 +02:00
Olivier Goffart
94a37c8e16
Move dark-color-sheme builtin in an internal namespace
2022-10-19 15:23:41 +02:00
Olivier Goffart
6ee932883a
Rename stark-style to dark-color-scheme
...
That's the term used by CSS
2022-10-19 15:23:41 +02:00
Olivier Goffart
0ba468c236
Use a builtin function to access the dark-style
...
instead of a property on NativeStyleMetrics
2022-10-19 15:23:41 +02:00
Olivier Goffart
92b4f52556
Make mod()
a macro that can take generic types instead of just integer
2022-07-11 17:49:28 +02:00
Olivier Goffart
d48c590346
Add animation-tick()
builtin function
...
Low level primitive allowing to build always running animations
2022-07-11 17:49:28 +02:00
Olivier Goffart
31502d5918
VSCode web extension: load files from the vscode API
...
We can't use file system call to load files with wasm, we need to go through the vscode API
Note that this is all async, so i had to prevent re-entry within the compiler using a rentry trick.
I removed the lifetime in the TypeLoader because I thought this was going to be necessary
to get 'static futures. But it turned out not to be necessary. Anyway, I kept it htis way because
it is actually nicer IMHO, even if the CompilationConfiguration is now copied
2022-06-02 16:21:07 +02:00
Olivier Goffart
54a6cb22ee
Allow .darker and .brighter on Brush
2022-04-12 13:01:53 +02: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