summaryrefslogtreecommitdiffstats
path: root/widget/src/pick_list.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-25 22:12:47 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-25 22:12:47 +0100
commit74373cb086da6097eae7d2e8bd6348aaf7c43857 (patch)
tree8b179190049b8611a18e29e13e7379d5c0f9b8b4 /widget/src/pick_list.rs
parentf0ae9a0c38c2532220a7460916604914db94c078 (diff)
downloadiced-74373cb086da6097eae7d2e8bd6348aaf7c43857.tar.gz
iced-74373cb086da6097eae7d2e8bd6348aaf7c43857.tar.bz2
iced-74373cb086da6097eae7d2e8bd6348aaf7c43857.zip
Make defaults of composite widgets configurable
Diffstat (limited to 'widget/src/pick_list.rs')
-rw-r--r--widget/src/pick_list.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/widget/src/pick_list.rs b/widget/src/pick_list.rs
index e9c33d3d..801e792b 100644
--- a/widget/src/pick_list.rs
+++ b/widget/src/pick_list.rs
@@ -84,7 +84,7 @@ where
font: None,
handle: Handle::default(),
class: <Theme as Catalog>::default(),
- menu_class: <Theme as menu::Catalog>::default(),
+ menu_class: <Theme as Catalog>::default_menu(),
}
}
@@ -700,6 +700,11 @@ pub trait Catalog: menu::Catalog {
/// The default class produced by the [`Catalog`].
fn default<'a>() -> <Self as Catalog>::Class<'a>;
+ /// The default class for the menu of the [`PickList`].
+ fn default_menu<'a>() -> <Self as menu::Catalog>::Class<'a> {
+ <Self as menu::Catalog>::default()
+ }
+
/// The [`Style`] of a class with the given status.
fn style(
&self,