From 74373cb086da6097eae7d2e8bd6348aaf7c43857 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 25 Mar 2024 22:12:47 +0100 Subject: Make defaults of composite widgets configurable --- widget/src/pick_list.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'widget/src/pick_list.rs') 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: ::default(), - menu_class: ::default(), + menu_class: ::default_menu(), } } @@ -700,6 +700,11 @@ pub trait Catalog: menu::Catalog { /// The default class produced by the [`Catalog`]. fn default<'a>() -> ::Class<'a>; + /// The default class for the menu of the [`PickList`]. + fn default_menu<'a>() -> ::Class<'a> { + ::default() + } + /// The [`Style`] of a class with the given status. fn style( &self, -- cgit