-
-
Notifications
You must be signed in to change notification settings - Fork 751
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
Linear gradient #2038
Linear gradient #2038
Conversation
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.
This looks good, thank you!
I think the angle should be specified in degrees in the config, as that is more of a lay-person's unit, and is easier to intuit what a given degree value means than the equivalent in radians!
regarding the name Directional
, what do you think about maybe renaming it to Linear
?
That feels closer to the CSS equivalent: https://developer.mozilla.org/en-US/docs/web/css/gradient/linear-gradient
I agree. Will fix :) |
Renamed to |
Thanks! |
I've added a new Directional gradient as suggested in #2023. I've also included a example to the window_background_gradient.md.
It's a linear gradient which can be rotated around the window center. Using radians per now. Should i change this to degrees?
You should now be able to add diagonal (or similar) gradients like in this example.
Here's the screenshot I've used in the example:
This is my first time using Rust, but the other examples made it quite easy to implement. Suggestions are welcomed.