Introduce StyleSheet for Text widget

This commit is contained in:
Héctor Ramón Jiménez 2022-06-29 10:51:01 +02:00
parent c807abdfd7
commit 1dd1a2f97f
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
28 changed files with 183 additions and 87 deletions

18
style/src/text.rs Normal file
View 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 }
}
}