From 0974e9e86523174e7a07d992b48d681aa07d4a7e Mon Sep 17 00:00:00 2001 From: Casper Rogild Storm <2248455+casperstorm@users.noreply.github.com> Date: Tue, 29 Nov 2022 11:36:00 +0100 Subject: Added ability to customize accessory content. --- style/src/pick_list.rs | 2 -- style/src/theme.rs | 2 -- 2 files changed, 4 deletions(-) (limited to 'style/src') diff --git a/style/src/pick_list.rs b/style/src/pick_list.rs index 8d93dff2..103cc026 100644 --- a/style/src/pick_list.rs +++ b/style/src/pick_list.rs @@ -16,8 +16,6 @@ pub struct Appearance { pub border_width: f32, /// The border color of the pick list. pub border_color: Color, - /// The size of the arrow icon of the pick list. - pub icon_size: f32, } /// A set of rules that dictate the style of a container. diff --git a/style/src/theme.rs b/style/src/theme.rs index d7ebb827..3b38c2c1 100644 --- a/style/src/theme.rs +++ b/style/src/theme.rs @@ -537,7 +537,6 @@ impl pick_list::StyleSheet for Theme { border_radius: 2.0, border_width: 1.0, border_color: palette.background.strong.color, - icon_size: 0.7, } } PickList::Custom(custom, _) => custom.active(self), @@ -556,7 +555,6 @@ impl pick_list::StyleSheet for Theme { border_radius: 2.0, border_width: 1.0, border_color: palette.primary.strong.color, - icon_size: 0.7, } } PickList::Custom(custom, _) => custom.active(self), -- cgit 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. --- style/src/pick_list.rs | 2 ++ style/src/theme.rs | 2 ++ 2 files changed, 4 insertions(+) (limited to 'style/src') 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 From 39f49186cefa688a1cc80ed754ec4028c642636a Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 14 Dec 2022 03:29:20 +0100 Subject: Rename `pick_list::AccessoryContent` to `Handle` ... and rename `Default` variant to `Arrow`. --- style/src/pick_list.rs | 4 ++-- style/src/theme.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'style/src') diff --git a/style/src/pick_list.rs b/style/src/pick_list.rs index 877a58da..11e13b01 100644 --- a/style/src/pick_list.rs +++ b/style/src/pick_list.rs @@ -8,8 +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 handle [`Color`] of the pick list. + pub handle_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 81bcfa67..bd0ae28e 100644 --- a/style/src/theme.rs +++ b/style/src/theme.rs @@ -534,7 +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, + handle_color: palette.background.weak.text, border_radius: 2.0, border_width: 1.0, border_color: palette.background.strong.color, @@ -553,7 +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, + handle_color: palette.background.weak.text, border_radius: 2.0, border_width: 1.0, border_color: palette.primary.strong.color, -- cgit