diff options
| author | Polesznyák Márk <contact@pml68.dev> | 2025-11-22 08:30:00 +0100 |
|---|---|---|
| committer | Polesznyák Márk <contact@pml68.dev> | 2025-11-22 08:30:00 +0100 |
| commit | ff7e17988d5868c72cfb39d09ccf4efb05d3ceda (patch) | |
| tree | 0734e0f409028e203532bfaea2c7372e2c646078 /src/text.rs | |
| parent | chore: add mailmap (diff) | |
| download | iced_material-ff7e17988d5868c72cfb39d09ccf4efb05d3ceda.tar.gz | |
feat!: combine `Primary`, `Secondary`, `Tertiary` and `Error`
Now only a singular `ColorQuartet` struct exists.
Also rename some `Surface` and `Inverse` fields for consistency.
Diffstat (limited to 'src/text.rs')
| -rw-r--r-- | src/text.rs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/text.rs b/src/text.rs index 8da3cdf..43979ba 100644 --- a/src/text.rs +++ b/src/text.rs @@ -21,66 +21,66 @@ pub fn none(_: &Theme) -> Style { pub fn primary(theme: &Theme) -> Style { Style { - color: Some(theme.colors().primary.on_primary), + color: Some(theme.colors().primary.text), } } pub fn primary_container(theme: &Theme) -> Style { Style { - color: Some(theme.colors().primary.on_primary_container), + color: Some(theme.colors().primary.container_text), } } pub fn secondary(theme: &Theme) -> Style { Style { - color: Some(theme.colors().secondary.on_secondary), + color: Some(theme.colors().secondary.text), } } pub fn secondary_container(theme: &Theme) -> Style { Style { - color: Some(theme.colors().secondary.on_secondary_container), + color: Some(theme.colors().secondary.container_text), } } pub fn tertiary(theme: &Theme) -> Style { Style { - color: Some(theme.colors().tertiary.on_tertiary), + color: Some(theme.colors().tertiary.text), } } pub fn tertiary_container(theme: &Theme) -> Style { Style { - color: Some(theme.colors().tertiary.on_tertiary_container), + color: Some(theme.colors().tertiary.container_text), } } pub fn error(theme: &Theme) -> Style { Style { - color: Some(theme.colors().error.on_error), + color: Some(theme.colors().error.text), } } pub fn error_container(theme: &Theme) -> Style { Style { - color: Some(theme.colors().error.on_error_container), + color: Some(theme.colors().error.container_text), } } pub fn surface(theme: &Theme) -> Style { Style { - color: Some(theme.colors().surface.on_surface), + color: Some(theme.colors().surface.text), } } pub fn surface_variant(theme: &Theme) -> Style { Style { - color: Some(theme.colors().surface.on_surface_variant), + color: Some(theme.colors().surface.text_variant), } } pub fn inverse_surface(theme: &Theme) -> Style { Style { - color: Some(theme.colors().inverse.inverse_on_surface), + color: Some(theme.colors().inverse.inverse_surface_text), } } |
