diff options
author | 2020-01-01 18:26:49 +0100 | |
---|---|---|
committer | 2020-01-01 18:26:49 +0100 | |
commit | 5af4159848341b14f6ff9ae14a9a222d8d8b0fb8 (patch) | |
tree | 436220784428b33b8e378403d11496db2d87884b /style/src/container.rs | |
parent | d96ced8e2da703117a43399110ef2b8fa21a7546 (diff) | |
download | iced-5af4159848341b14f6ff9ae14a9a222d8d8b0fb8.tar.gz iced-5af4159848341b14f6ff9ae14a9a222d8d8b0fb8.tar.bz2 iced-5af4159848341b14f6ff9ae14a9a222d8d8b0fb8.zip |
Draft basic styling for `TextInput`
Diffstat (limited to 'style/src/container.rs')
-rw-r--r-- | style/src/container.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/style/src/container.rs b/style/src/container.rs index 756ea0f9..a9cd3ccc 100644 --- a/style/src/container.rs +++ b/style/src/container.rs @@ -12,6 +12,12 @@ pub struct Style { /// A set of rules that dictate the style of a container. pub trait StyleSheet { /// Produces the style of a container. + fn style(&self) -> Style; +} + +struct Default; + +impl StyleSheet for Default { fn style(&self) -> Style { Style { text_color: None, @@ -21,10 +27,6 @@ pub trait StyleSheet { } } -struct Default; - -impl StyleSheet for Default {} - impl std::default::Default for Box<dyn StyleSheet> { fn default() -> Self { Box::new(Default) |