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

@ -4,8 +4,8 @@ use iced::scrollable::{self, Scrollable};
use iced::text_input::{self, TextInput};
use iced::theme::{self, Theme};
use iced::{
Application, Checkbox, Column, Command, Container, Element, Font, Length,
Row, Settings, Text,
Application, Checkbox, Color, Column, Command, Container, Element, Font,
Length, Row, Settings, Text,
};
use serde::{Deserialize, Serialize};
@ -155,7 +155,7 @@ impl Application for Todos {
let title = Text::new("todos")
.width(Length::Fill)
.size(100)
.color([0.5, 0.5, 0.5])
.style(Color::from([0.5, 0.5, 0.5]))
.horizontal_alignment(alignment::Horizontal::Center);
let input = TextInput::new(
@ -453,7 +453,7 @@ fn empty_message<'a>(message: &str) -> Element<'a, Message> {
.width(Length::Fill)
.size(25)
.horizontal_alignment(alignment::Horizontal::Center)
.color([0.7, 0.7, 0.7]),
.style(Color::from([0.7, 0.7, 0.7])),
)
.width(Length::Fill)
.height(Length::Units(200))