Add default and base stylings to text widget

This commit is contained in:
Héctor Ramón Jiménez 2024-07-13 13:26:22 +02:00
parent a3d9cf2a64
commit 5e6d994199
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -373,6 +373,18 @@ impl Catalog for Theme {
}
}
/// The default text styling; color is inherited.
pub fn default(_theme: &Theme) -> Style {
Style { color: None }
}
/// Text with the default base color.
pub fn base(theme: &Theme) -> Style {
Style {
color: Some(theme.palette().text),
}
}
/// Text conveying some important information, like an action.
pub fn primary(theme: &Theme) -> Style {
Style {