From fe5ab1ee87ede2d80212aa58724fd5ed463f58e4 Mon Sep 17 00:00:00 2001 From: Casper Rogild Storm <2248455+casperstorm@users.noreply.github.com> Date: Tue, 29 Nov 2022 12:06:45 +0100 Subject: Added accessory_content_color to appreance. --- native/src/widget/pick_list.rs | 2 +- style/src/pick_list.rs | 2 ++ style/src/theme.rs | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/native/src/widget/pick_list.rs b/native/src/widget/pick_list.rs index 31f7bf5b..6a2061b9 100644 --- a/native/src/widget/pick_list.rs +++ b/native/src/widget/pick_list.rs @@ -615,7 +615,7 @@ pub fn draw( content: &content, size, font, - color: style.text_color, + color: style.accessory_content_color, bounds: Rectangle { x: bounds.x + bounds.width - f32::from(padding.horizontal()), y: bounds.center_y() - size / 2.0, diff --git a/style/src/pick_list.rs b/style/src/pick_list.rs index 103cc026..877a58da 100644 --- a/style/src/pick_list.rs +++ b/style/src/pick_list.rs @@ -8,6 +8,8 @@ pub struct Appearance { pub text_color: Color, /// The placeholder [`Color`] of the pick list. pub placeholder_color: Color, + /// The accessory content [`Color`] of the pick list. + pub accessory_content_color: Color, /// The [`Background`] of the pick list. pub background: Background, /// The border radius of the pick list. diff --git a/style/src/theme.rs b/style/src/theme.rs index 3b38c2c1..81bcfa67 100644 --- a/style/src/theme.rs +++ b/style/src/theme.rs @@ -534,6 +534,7 @@ impl pick_list::StyleSheet for Theme { text_color: palette.background.weak.text, background: palette.background.weak.color.into(), placeholder_color: palette.background.strong.color, + accessory_content_color: palette.background.weak.text, border_radius: 2.0, border_width: 1.0, border_color: palette.background.strong.color, @@ -552,6 +553,7 @@ impl pick_list::StyleSheet for Theme { text_color: palette.background.weak.text, background: palette.background.weak.color.into(), placeholder_color: palette.background.strong.color, + accessory_content_color: palette.background.weak.text, border_radius: 2.0, border_width: 1.0, border_color: palette.primary.strong.color, -- cgit