Introduce StyleSheet for Text widget
This commit is contained in:
parent
c807abdfd7
commit
1dd1a2f97f
28 changed files with 183 additions and 87 deletions
18
style/src/text.rs
Normal file
18
style/src/text.rs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
use iced_core::Color;
|
||||
|
||||
pub trait StyleSheet {
|
||||
type Style: Default + Copy;
|
||||
|
||||
fn appearance(&self, style: Self::Style) -> Appearance;
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub struct Appearance {
|
||||
pub color: Option<Color>,
|
||||
}
|
||||
|
||||
impl Default for Appearance {
|
||||
fn default() -> Self {
|
||||
Self { color: None }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue