From ff7e17988d5868c72cfb39d09ccf4efb05d3ceda Mon Sep 17 00:00:00 2001 From: Polesznyák Márk Date: Sat, 22 Nov 2025 08:30:00 +0100 Subject: feat!: combine `Primary`, `Secondary`, `Tertiary` and `Error` Now only a singular `ColorQuartet` struct exists. Also rename some `Surface` and `Inverse` fields for consistency. --- src/text.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/text.rs') 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), } } -- cgit v1.2.3