diff options
author | 2024-06-19 01:53:40 +0200 | |
---|---|---|
committer | 2024-06-19 01:53:40 +0200 | |
commit | 341c9a3c12aa9d327ef1d8f168ea0adb9b5ad10b (patch) | |
tree | 6a37f29352b1768911b6d42c220f22ebecc202ee /examples/gradient | |
parent | 368b15f70896b387ae3f072e807b289b36b2d103 (diff) | |
download | iced-341c9a3c12aa9d327ef1d8f168ea0adb9b5ad10b.tar.gz iced-341c9a3c12aa9d327ef1d8f168ea0adb9b5ad10b.tar.bz2 iced-341c9a3c12aa9d327ef1d8f168ea0adb9b5ad10b.zip |
Introduce `daemon` API and unify shell runtimes
Diffstat (limited to 'examples/gradient')
-rw-r--r-- | examples/gradient/src/main.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/gradient/src/main.rs b/examples/gradient/src/main.rs index 2b906c32..e5b19443 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, }; @@ -8,7 +8,7 @@ use iced::{Alignment, Color, Element, Length, Radians, Theme}; pub fn main() -> iced::Result { tracing_subscriber::fmt::init(); - iced::program("Gradient - Iced", Gradient::update, Gradient::view) + iced::application("Gradient - Iced", Gradient::update, Gradient::view) .style(Gradient::style) .transparent(true) .run() @@ -95,11 +95,11 @@ impl Gradient { .into() } - fn style(&self, theme: &Theme) -> program::Appearance { - use program::DefaultStyle; + fn style(&self, theme: &Theme) -> application::Appearance { + use application::DefaultStyle; if self.transparent { - program::Appearance { + application::Appearance { background_color: Color::TRANSPARENT, text_color: theme.palette().text, } |