diff options
author | 2022-07-08 20:23:38 +0200 | |
---|---|---|
committer | 2022-07-08 20:23:38 +0200 | |
commit | 3e643a9d6b904bcb46f94d2961d911deea915cf1 (patch) | |
tree | 31a3d01188d6623b9b922dd905196deca397ee84 /style/src | |
parent | 3514bd1535bc8421c746d981ca488883486de97f (diff) | |
download | iced-3e643a9d6b904bcb46f94d2961d911deea915cf1.tar.gz iced-3e643a9d6b904bcb46f94d2961d911deea915cf1.tar.bz2 iced-3e643a9d6b904bcb46f94d2961d911deea915cf1.zip |
Fix inconsistent styling for `Radio` and `Checkbox`
Diffstat (limited to 'style/src')
-rw-r--r-- | style/src/theme.rs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/style/src/theme.rs b/style/src/theme.rs index 70b32edf..d2de8a5d 100644 --- a/style/src/theme.rs +++ b/style/src/theme.rs @@ -171,21 +171,25 @@ impl checkbox::StyleSheet for Theme { match style { Checkbox::Primary => checkbox_appearance( + palette.primary.strong.text, palette.background.base, palette.primary.strong, is_checked, ), Checkbox::Secondary => checkbox_appearance( + palette.background.base.text, palette.background.base, palette.background.base, is_checked, ), Checkbox::Success => checkbox_appearance( + palette.success.base.text, palette.background.base, palette.success.base, is_checked, ), Checkbox::Danger => checkbox_appearance( + palette.danger.base.text, palette.background.base, palette.danger.base, is_checked, @@ -202,21 +206,25 @@ impl checkbox::StyleSheet for Theme { match style { Checkbox::Primary => checkbox_appearance( + palette.primary.strong.text, palette.background.weak, palette.primary.base, is_checked, ), Checkbox::Secondary => checkbox_appearance( + palette.background.base.text, palette.background.weak, palette.background.base, is_checked, ), Checkbox::Success => checkbox_appearance( + palette.success.base.text, palette.background.weak, palette.success.base, is_checked, ), Checkbox::Danger => checkbox_appearance( + palette.danger.base.text, palette.background.weak, palette.danger.base, is_checked, @@ -226,6 +234,7 @@ impl checkbox::StyleSheet for Theme { } fn checkbox_appearance( + checkmark_color: Color, base: palette::Pair, accent: palette::Pair, is_checked: bool, @@ -236,7 +245,7 @@ fn checkbox_appearance( } else { base.color }), - checkmark_color: accent.text, + checkmark_color, border_radius: 2.0, border_width: 1.0, border_color: accent.color, @@ -422,7 +431,7 @@ impl radio::StyleSheet for Theme { let palette = self.extended_palette(); radio::Appearance { - dot_color: palette.primary.weak.text.into(), + dot_color: palette.primary.strong.color.into(), background: palette.primary.weak.color.into(), ..active } |