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

@ -6,7 +6,7 @@ use iced::pure::{
};
use iced::theme::{self, Theme};
use iced::window;
use iced::{Command, Font, Length, Settings};
use iced::{Color, Command, Font, Length, Settings};
use serde::{Deserialize, Serialize};
pub fn main() -> iced::Result {
@ -155,7 +155,7 @@ impl Application for Todos {
let title = text("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 = text_input(
@ -406,7 +406,7 @@ fn empty_message(message: &str) -> Element<'_, 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))