use super::style::{DefaultTextStyle, TextStyle};
use super::theme::{DefaultTextTheme, TextTheme};
pub struct TextSettings {
pub theme: Box<dyn TextTheme>,
pub style: Box<dyn TextStyle>,
}
impl Default for TextSettings {
fn default() -> Self {
Self {
theme: Box::new(DefaultTextTheme),
style: Box::new(DefaultTextStyle),
}
}
}
impl TextSettings {
pub fn with_theme(mut self, theme: Box<dyn TextTheme>) -> Self {
self.theme = theme;
self
}
pub fn with_style(mut self, style: Box<dyn TextStyle>) -> Self {
self.style = style;
self
}
}