Draft basic styling for TextInput
This commit is contained in:
parent
d96ced8e2d
commit
5af4159848
10 changed files with 143 additions and 36 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue