-
Notifications
You must be signed in to change notification settings - Fork 784
Add an Easing namespace #9179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an Easing namespace #9179
Conversation
The definition of an Easing namespace allows to name an easing curve outside an expression of type easing like, for instance, a struct field. Closes slint-ui#3943. Closes slint-ui#5734.
Now that we can create structs containing easing curves in Slint code, we need to be able to instantiate such structs from Rust code. Thus, the EasingCurve enum must be exposed as part of the public API.
|
I'm gonna need some help to expose Is there any guide I can follow? |
|
Thanks for the PR! This does two things:
I suggest to split the PR in two so we can merge them separately. |
|
I've documented the |
ogoffart
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. The code looks good.
One note for the documentation though, there is no other documentation for the Easing namespace now. So the sentence should also define the Easing namespace there saying that all the names are part of the namespace.
|
Nice! I improved the documentation and added a small snippet showing the definition of an easing curve via the |
This PR adds an
Easingnamespace to Slint. This way, we can name an easing curve outside an expression of typeeasing. We can, for instance, have a struct with a field of typeeasing.Since now we can create structs containing easing curves in Slint code, we need to be able to construct such structs from Rust code. Thus, the
EasingCurveenum was made part of the public API.Closes #3943.
Closes #5734.