From cdb18e610a72b4a025d7e1890140393adee5b087 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sun, 17 Mar 2024 19:38:42 +0100 Subject: Move `Application` trait to `advanced` module --- examples/gradient/src/main.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'examples/gradient/src') diff --git a/examples/gradient/src/main.rs b/examples/gradient/src/main.rs index 9c48f4b9..22c21cdd 100644 --- a/examples/gradient/src/main.rs +++ b/examples/gradient/src/main.rs @@ -1,5 +1,5 @@ -use iced::application; use iced::gradient; +use iced::program; use iced::widget::{ checkbox, column, container, horizontal_space, row, slider, text, }; @@ -95,14 +95,16 @@ impl Gradient { .into() } - fn style(&self, theme: &Theme) -> application::Appearance { + fn style(&self, theme: &Theme) -> program::Appearance { + use program::DefaultStyle; + if self.transparent { - application::Appearance { + program::Appearance { background_color: Color::TRANSPARENT, text_color: theme.palette().text, } } else { - application::default(theme) + Theme::default_style(theme) } } } -- cgit