Simplify theming for Text widget

This commit is contained in:
Héctor Ramón Jiménez 2024-03-04 19:31:26 +01:00
parent ce309db37b
commit 4130ae4be9
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
12 changed files with 116 additions and 122 deletions

View file

@ -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),