From ce07acf6fedd705d6380739fbc5da40f95739e04 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 27 Jan 2025 01:09:16 +0100 Subject: Make all `Color` constructors `const` :tada: --- examples/gradient/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/gradient/src/main.rs b/examples/gradient/src/main.rs index 910ea9fc..428ef6fb 100644 --- a/examples/gradient/src/main.rs +++ b/examples/gradient/src/main.rs @@ -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, } -- cgit