diff options
author | 2019-12-05 00:19:13 +0100 | |
---|---|---|
committer | 2019-12-05 00:19:13 +0100 | |
commit | f87ddf1056327551b4a2bba9e98cbb7816b6666c (patch) | |
tree | 256269a85712c96d6e43b02c9343a8265599b081 /examples/pokedex.rs | |
parent | ed045b45ba9490b6020618fb13c7dbc3ea5032ab (diff) | |
parent | 33ad332ce99fff5de8e50a5b5c98f3ce181c311a (diff) | |
download | iced-f87ddf1056327551b4a2bba9e98cbb7816b6666c.tar.gz iced-f87ddf1056327551b4a2bba9e98cbb7816b6666c.tar.bz2 iced-f87ddf1056327551b4a2bba9e98cbb7816b6666c.zip |
Merge pull request #107 from Maldela/background
Implemented `From<Color` for `Background`
Diffstat (limited to 'examples/pokedex.rs')
-rw-r--r-- | examples/pokedex.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/pokedex.rs b/examples/pokedex.rs index 8e0af7b2..6893bb73 100644 --- a/examples/pokedex.rs +++ b/examples/pokedex.rs @@ -1,5 +1,5 @@ use iced::{ - button, image, Align, Application, Background, Button, Color, Column, + button, image, Align, Application, Button, Color, Column, Command, Container, Element, Image, Length, Row, Settings, Text, }; @@ -225,7 +225,7 @@ impl From<reqwest::Error> 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(Background::Color([0.11, 0.42, 0.87].into())) + .background(Color::from_rgb(0.11, 0.42, 0.87).into()) .border_radius(10) .padding(10) } |