From e92ea48e8814b42fc566017db085ca9bdaf3c272 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 5 Dec 2019 01:57:35 +0100 Subject: Make `Button::background` generic --- examples/todos.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'examples/todos.rs') diff --git a/examples/todos.rs b/examples/todos.rs index 684c9fea..5f435fdc 100644 --- a/examples/todos.rs +++ b/examples/todos.rs @@ -1,7 +1,7 @@ use iced::{ - button, scrollable, text_input, Align, Application, Button, - Checkbox, Color, Column, Command, Container, Element, Font, - HorizontalAlignment, Length, Row, Scrollable, Settings, Text, TextInput, + button, scrollable, text_input, Align, Application, Button, Checkbox, + Color, Column, Command, Container, Element, Font, HorizontalAlignment, + Length, Row, Scrollable, Settings, Text, TextInput, }; use serde::{Deserialize, Serialize}; @@ -332,7 +332,7 @@ impl Task { .on_press(TaskMessage::Delete) .padding(10) .border_radius(5) - .background(Color::from_rgb(0.8, 0.2, 0.2).into()), + .background(Color::from_rgb(0.8, 0.2, 0.2)), ) .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(Color::from_rgb(0.2, 0.2, 0.7).into()) + .background(Color::from_rgb(0.2, 0.2, 0.7)) } else { Button::new(state, label) }; -- cgit