diff options
author | 2024-01-10 08:15:05 +0100 | |
---|---|---|
committer | 2024-01-10 10:01:51 +0100 | |
commit | 3850a46db6e13f2948f5731f4ceec42764391f5d (patch) | |
tree | 032c2cf31412cbc87beef56b7654bbc1a1909c81 /examples/styling | |
parent | d76705df29f1960124bd06277683448e18f788b0 (diff) | |
download | iced-3850a46db6e13f2948f5731f4ceec42764391f5d.tar.gz iced-3850a46db6e13f2948f5731f4ceec42764391f5d.tar.bz2 iced-3850a46db6e13f2948f5731f4ceec42764391f5d.zip |
Add `Theme` selector to `layout` example
Diffstat (limited to 'examples/styling')
-rw-r--r-- | examples/styling/src/main.rs | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/examples/styling/src/main.rs b/examples/styling/src/main.rs index f14f6a8f..10f3c79d 100644 --- a/examples/styling/src/main.rs +++ b/examples/styling/src/main.rs @@ -53,13 +53,16 @@ impl Sandbox for Styling { self.theme = match theme { ThemeType::Light => Theme::Light, ThemeType::Dark => Theme::Dark, - ThemeType::Custom => Theme::custom(theme::Palette { - background: Color::from_rgb(1.0, 0.9, 1.0), - text: Color::BLACK, - primary: Color::from_rgb(0.5, 0.5, 0.0), - success: Color::from_rgb(0.0, 1.0, 0.0), - danger: Color::from_rgb(1.0, 0.0, 0.0), - }), + ThemeType::Custom => Theme::custom( + String::from("Custom"), + theme::Palette { + background: Color::from_rgb(1.0, 0.9, 1.0), + text: Color::BLACK, + primary: Color::from_rgb(0.5, 0.5, 0.0), + success: Color::from_rgb(0.0, 1.0, 0.0), + danger: Color::from_rgb(1.0, 0.0, 0.0), + }, + ), } } Message::InputChanged(value) => self.input_value = value, |