summaryrefslogtreecommitdiffstats
path: root/examples/gradient
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-17 19:38:42 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-17 19:38:42 +0100
commitcdb18e610a72b4a025d7e1890140393adee5b087 (patch)
tree50f8c8264cdb5b2a09c440b7f598e5aa23846120 /examples/gradient
parent943b6c965773748f8cacaa4fe385ac4a3bfb1e69 (diff)
downloadiced-cdb18e610a72b4a025d7e1890140393adee5b087.tar.gz
iced-cdb18e610a72b4a025d7e1890140393adee5b087.tar.bz2
iced-cdb18e610a72b4a025d7e1890140393adee5b087.zip
Move `Application` trait to `advanced` module
Diffstat (limited to 'examples/gradient')
-rw-r--r--examples/gradient/src/main.rs10
1 files changed, 6 insertions, 4 deletions
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)
}
}
}