diff options
author | 2020-01-05 19:36:44 +0100 | |
---|---|---|
committer | 2020-01-05 19:36:44 +0100 | |
commit | 7c4dba29c7614428041bda049924569d751cbb1a (patch) | |
tree | 8611124a6441d673a0d2ea158d14cb70b3ffc44e /style | |
parent | 07ef59af78107db103b7a9640a660ecae95b1156 (diff) | |
download | iced-7c4dba29c7614428041bda049924569d751cbb1a.tar.gz iced-7c4dba29c7614428041bda049924569d751cbb1a.tar.bz2 iced-7c4dba29c7614428041bda049924569d751cbb1a.zip |
Implement `Default` for `text_input::Style`
Diffstat (limited to 'style')
-rw-r--r-- | style/src/text_input.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/style/src/text_input.rs b/style/src/text_input.rs index 75f427a7..269b28db 100644 --- a/style/src/text_input.rs +++ b/style/src/text_input.rs @@ -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. |