Open bryce-happel-walton opened 1 week ago
Indeed, it would be worth displaying a warning when the user literally use @...-gradiant macro that is immediately converted to a colour.
The condition can be detected there https://github.com/slint-ui/slint/blob/74e23881b50544069adc69dbc590c33f04e4cab5/internal/compiler/expression_tree.rs#L1102
Language: Rust Platform: Arm64
While messing around with brushes I noticed I wasn't getting the expected results from a gradient. Eventually I figured out that I was passing the macro to a
property <color>
and passing theproperty <color>
to aproperty <brush>
.Using gradient macros on
property <color>
should at least produce a warning. It will truncate the result to the first color provided to the macro, I do not believe this to be an intuitive outcome.