diff options
| author | pml68 <contact@pml68.dev> | 2025-04-22 20:27:20 +0200 |
|---|---|---|
| committer | pml68 <contact@pml68.dev> | 2025-04-22 20:27:20 +0200 |
| commit | 4dc531f63712e8072a785bd1ec22f35aab3b9140 (patch) | |
| tree | 0060976db7e5539dac60c7541f9fabc6b9bc367d /theme_test | |
| parent | feat(material_theme): implement `text_editor::Catalog` (diff) | |
| download | iced-builder-4dc531f63712e8072a785bd1ec22f35aab3b9140.tar.gz | |
refactor(material_theme): make `Theme` `Copy`, add `Theme::ALL` constant
Diffstat (limited to 'theme_test')
| -rw-r--r-- | theme_test/src/main.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/theme_test/src/main.rs b/theme_test/src/main.rs index 3331196..7ec7f15 100644 --- a/theme_test/src/main.rs +++ b/theme_test/src/main.rs @@ -5,6 +5,7 @@ use iced::widget::{ use iced::{Element, Length}; use iced_anim::{Animated, Animation, Event}; use iced_dialog::dialog; +use material_theme::Theme; use material_theme::button::{elevated, filled_tonal, outlined, text}; use material_theme::container::{ error, error_container, inverse_surface, primary, primary_container, @@ -13,11 +14,10 @@ use material_theme::container::{ surface_container_lowest, tertiary, tertiary_container, }; use material_theme::text::surface_variant; -use material_theme::{DARK, LIGHT, Theme}; fn main() -> iced::Result { iced::application(State::default, State::update, State::view) - .theme(|state| state.theme.value().clone()) + .theme(|state| *state.theme.value()) .run() } @@ -190,7 +190,7 @@ impl State { column![ // Pick List pick_list( - [LIGHT.clone(), DARK.clone()], + Theme::ALL, Some(self.theme.target()), |theme| Message::SwitchTheme(theme.into()) ) |
