Implement Default for text_input::Style

This commit is contained in:
Héctor Ramón Jiménez 2020-01-05 19:36:44 +01:00
parent 07ef59af78
commit 7c4dba29c7

View File

@ -10,6 +10,17 @@ pub struct Style {
pub border_color: Color,
}
impl std::default::Default for Style {
fn default() -> Self {
Self {
background: Background::Color(Color::WHITE),
border_radius: 0,
border_width: 0,
border_color: Color::TRANSPARENT,
}
}
}
/// A set of rules that dictate the style of a text input.
pub trait StyleSheet {
/// Produces the style of an active text input.