Introduce StyleSheet for Text widget

This commit is contained in:
Héctor Ramón Jiménez 2022-06-29 10:51:01 +02:00
parent c807abdfd7
commit 1dd1a2f97f
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
28 changed files with 183 additions and 87 deletions

View file

@ -2,7 +2,7 @@ use iced::button;
use iced::futures;
use iced::image;
use iced::{
Alignment, Application, Button, Column, Command, Container, Element,
Alignment, Application, Button, Color, Column, Command, Container, Element,
Length, Row, Settings, Text, Theme,
};
@ -143,7 +143,7 @@ impl Pokemon {
.push(
Text::new(format!("#{}", self.number))
.size(20)
.color([0.5, 0.5, 0.5]),
.style(Color::from([0.5, 0.5, 0.5])),
),
)
.push(Text::new(&self.description)),