Implement Default
for container::Style
This commit is contained in:
parent
1a0effa961
commit
07ef59af78
@ -14,7 +14,7 @@ pub struct Style {
|
|||||||
|
|
||||||
impl std::default::Default for Style {
|
impl std::default::Default for Style {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Style {
|
Self {
|
||||||
shadow_offset: Vector::default(),
|
shadow_offset: Vector::default(),
|
||||||
background: None,
|
background: None,
|
||||||
border_radius: 0,
|
border_radius: 0,
|
||||||
|
@ -11,6 +11,18 @@ pub struct Style {
|
|||||||
pub border_color: Color,
|
pub border_color: Color,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl std::default::Default for Style {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self {
|
||||||
|
text_color: None,
|
||||||
|
background: None,
|
||||||
|
border_radius: 0,
|
||||||
|
border_width: 0,
|
||||||
|
border_color: Color::TRANSPARENT,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// A set of rules that dictate the style of a container.
|
/// A set of rules that dictate the style of a container.
|
||||||
pub trait StyleSheet {
|
pub trait StyleSheet {
|
||||||
/// Produces the style of a container.
|
/// Produces the style of a container.
|
||||||
|
Loading…
Reference in New Issue
Block a user