diff options
author | 2022-06-29 10:51:01 +0200 | |
---|---|---|
committer | 2022-06-29 10:51:01 +0200 | |
commit | 1dd1a2f97fc747e15e12b5188dad6c41b0d052ea (patch) | |
tree | ba2b24b9c8dec02b9232068dee299ca27a4823ba /examples/todos | |
parent | c807abdfd70c49b0c93868c12f142a2fb4c08036 (diff) | |
download | iced-1dd1a2f97fc747e15e12b5188dad6c41b0d052ea.tar.gz iced-1dd1a2f97fc747e15e12b5188dad6c41b0d052ea.tar.bz2 iced-1dd1a2f97fc747e15e12b5188dad6c41b0d052ea.zip |
Introduce `StyleSheet` for `Text` widget
Diffstat (limited to 'examples/todos')
-rw-r--r-- | examples/todos/src/main.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/todos/src/main.rs b/examples/todos/src/main.rs index 453cddc3..dc080ef5 100644 --- a/examples/todos/src/main.rs +++ b/examples/todos/src/main.rs @@ -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)) |