Implement Default for text_input::Style
This commit is contained in:
parent
07ef59af78
commit
7c4dba29c7
1 changed files with 11 additions and 0 deletions
|
|
@ -10,6 +10,17 @@ pub struct Style {
|
||||||
pub border_color: Color,
|
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.
|
/// A set of rules that dictate the style of a text input.
|
||||||
pub trait StyleSheet {
|
pub trait StyleSheet {
|
||||||
/// Produces the style of an active text input.
|
/// Produces the style of an active text input.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue