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/pokedex.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/pokedex.rs') diff --git a/examples/pokedex.rs b/examples/pokedex.rs index 6893bb73..b9daeabd 100644 --- a/examples/pokedex.rs +++ b/examples/pokedex.rs @@ -1,6 +1,6 @@ use iced::{ - button, image, Align, Application, Button, Color, Column, - Command, Container, Element, Image, Length, Row, Settings, Text, + button, image, Align, Application, Button, Color, Column, Command, + Container, Element, Image, Length, Row, Settings, Text, }; pub fn main() { @@ -225,7 +225,7 @@ impl From for Error { fn button<'a>(state: &'a mut button::State, text: &str) -> Button<'a, Message> { Button::new(state, Text::new(text).color(Color::WHITE)) - .background(Color::from_rgb(0.11, 0.42, 0.87).into()) + .background(Color::from_rgb(0.11, 0.42, 0.87)) .border_radius(10) .padding(10) } -- cgit