Make Button::background generic

This commit is contained in:
Héctor Ramón Jiménez 2019-12-05 01:57:35 +01:00
parent f87ddf1056
commit e92ea48e88
7 changed files with 21 additions and 20 deletions

View file

@ -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<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(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)
}