summaryrefslogtreecommitdiffstats
path: root/examples/gradient/src
diff options
context:
space:
mode:
authorLibravatar Héctor <hector@hecrj.dev>2024-12-17 17:28:46 +0100
committerLibravatar GitHub <noreply@github.com>2024-12-17 17:28:46 +0100
commitf2c9b6b2ffc50d67d9789e77cb55eeb2a0ebe470 (patch)
tree4941905adf134468acc079610bb6f25d7461d543 /examples/gradient/src
parenta687a837653a576cb0599f7bc8ecd9c6054213a9 (diff)
parente5545aaa579f428e45853d125ac86155d8395104 (diff)
downloadiced-f2c9b6b2ffc50d67d9789e77cb55eeb2a0ebe470.tar.gz
iced-f2c9b6b2ffc50d67d9789e77cb55eeb2a0ebe470.tar.bz2
iced-f2c9b6b2ffc50d67d9789e77cb55eeb2a0ebe470.zip
Merge pull request #2698 from iced-rs/feature/test-crate
Headless Mode Testing
Diffstat (limited to 'examples/gradient/src')
-rw-r--r--examples/gradient/src/main.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/examples/gradient/src/main.rs b/examples/gradient/src/main.rs
index b2de069f..910ea9fc 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::theme;
use iced::widget::{
checkbox, column, container, horizontal_space, row, slider, text,
};
@@ -95,16 +95,14 @@ impl Gradient {
.into()
}
- fn style(&self, theme: &Theme) -> application::Appearance {
- use application::DefaultStyle;
-
+ fn style(&self, theme: &Theme) -> theme::Style {
if self.transparent {
- application::Appearance {
+ theme::Style {
background_color: Color::TRANSPARENT,
text_color: theme.palette().text,
}
} else {
- Theme::default_style(theme)
+ theme::default(theme)
}
}
}