Make all Color constructors const 🎉

This commit is contained in:
Héctor Ramón Jiménez 2025-01-27 01:09:16 +01:00
parent d9a454ac4d
commit ce07acf6fe
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
3 changed files with 15 additions and 44 deletions

View file

@ -3,7 +3,7 @@ use iced::theme;
use iced::widget::{
checkbox, column, container, horizontal_space, row, slider, text,
};
use iced::{Center, Color, Element, Fill, Radians, Theme};
use iced::{color, Center, Color, Element, Fill, Radians, Theme};
pub fn main() -> iced::Result {
tracing_subscriber::fmt::init();
@ -34,7 +34,7 @@ impl Gradient {
fn new() -> Self {
Self {
start: Color::WHITE,
end: Color::new(0.0, 0.0, 1.0, 1.0),
end: color!(0x0000ff),
angle: Radians(0.0),
transparent: false,
}