diff options
author | 2019-12-04 22:02:07 +0100 | |
---|---|---|
committer | 2019-12-04 22:02:07 +0100 | |
commit | 33ad332ce99fff5de8e50a5b5c98f3ce181c311a (patch) | |
tree | 256269a85712c96d6e43b02c9343a8265599b081 /examples/todos.rs | |
parent | ed045b45ba9490b6020618fb13c7dbc3ea5032ab (diff) | |
download | iced-33ad332ce99fff5de8e50a5b5c98f3ce181c311a.tar.gz iced-33ad332ce99fff5de8e50a5b5c98f3ce181c311a.tar.bz2 iced-33ad332ce99fff5de8e50a5b5c98f3ce181c311a.zip |
Implemented `From<Color` for `Background`
Diffstat (limited to 'examples/todos.rs')
-rw-r--r-- | examples/todos.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/todos.rs b/examples/todos.rs index af8a37a8..684c9fea 100644 --- a/examples/todos.rs +++ b/examples/todos.rs @@ -1,5 +1,5 @@ use iced::{ - button, scrollable, text_input, Align, Application, Background, Button, + button, scrollable, text_input, Align, Application, Button, Checkbox, Color, Column, Command, Container, Element, Font, HorizontalAlignment, Length, Row, Scrollable, Settings, Text, TextInput, }; @@ -332,7 +332,7 @@ impl Task { .on_press(TaskMessage::Delete) .padding(10) .border_radius(5) - .background(Background::Color([0.8, 0.2, 0.2].into())), + .background(Color::from_rgb(0.8, 0.2, 0.2).into()), ) .into() } @@ -361,7 +361,7 @@ impl Controls { let label = Text::new(label).size(16).width(Length::Shrink); let button = if filter == current_filter { Button::new(state, label.color(Color::WHITE)) - .background(Background::Color([0.2, 0.2, 0.7].into())) + .background(Color::from_rgb(0.2, 0.2, 0.7).into()) } else { Button::new(state, label) }; |