diff options
author | 2024-03-04 19:31:26 +0100 | |
---|---|---|
committer | 2024-03-04 19:32:13 +0100 | |
commit | 4130ae4be95ce850263fbc55f490b68a95361d58 (patch) | |
tree | 25b1acc723e217e5890e20aa8e796db0f35be231 /examples/pokedex | |
parent | ce309db37b8eb9860ae1f1be1710fb39e7a9edea (diff) | |
download | iced-4130ae4be95ce850263fbc55f490b68a95361d58.tar.gz iced-4130ae4be95ce850263fbc55f490b68a95361d58.tar.bz2 iced-4130ae4be95ce850263fbc55f490b68a95361d58.zip |
Simplify theming for `Text` widget
Diffstat (limited to 'examples/pokedex')
-rw-r--r-- | examples/pokedex/src/main.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/examples/pokedex/src/main.rs b/examples/pokedex/src/main.rs index 8b71a269..193f85f2 100644 --- a/examples/pokedex/src/main.rs +++ b/examples/pokedex/src/main.rs @@ -1,8 +1,6 @@ use iced::futures; use iced::widget::{self, column, container, image, row, text}; -use iced::{ - Alignment, Application, Color, Command, Element, Length, Settings, Theme, -}; +use iced::{Alignment, Application, Command, Element, Length, Settings, Theme}; pub fn main() -> iced::Result { Pokedex::run(Settings::default()) @@ -116,7 +114,7 @@ impl Pokemon { text(&self.name).size(30).width(Length::Fill), text(format!("#{}", self.number)) .size(20) - .style(Color::from([0.5, 0.5, 0.5])), + .color([0.5, 0.5, 0.5]), ] .align_items(Alignment::Center) .spacing(20), |