From fe4dfeafdbc8f427bd351f394d27f606a3843b44 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 28 Oct 2021 15:41:12 +0700 Subject: Wire up style to `PickList` and `overlay::Menu` --- graphics/src/overlay/menu.rs | 11 ----------- graphics/src/widget/pick_list.rs | 17 ----------------- 2 files changed, 28 deletions(-) (limited to 'graphics') diff --git a/graphics/src/overlay/menu.rs b/graphics/src/overlay/menu.rs index 7dfb48b9..c5ff093d 100644 --- a/graphics/src/overlay/menu.rs +++ b/graphics/src/overlay/menu.rs @@ -1,14 +1,3 @@ //! Build and show dropdown menus. -use crate::backend::{self, Backend}; -use crate::Renderer; - -use iced_native::overlay; pub use iced_style::menu::Style; - -impl overlay::menu::Renderer for Renderer -where - B: Backend + backend::Text, -{ - type Style = Style; -} diff --git a/graphics/src/widget/pick_list.rs b/graphics/src/widget/pick_list.rs index 54f42cde..b5cb0a44 100644 --- a/graphics/src/widget/pick_list.rs +++ b/graphics/src/widget/pick_list.rs @@ -1,26 +1,9 @@ //! Display a dropdown list of selectable values. -use crate::backend::{self, Backend}; use crate::Renderer; -use iced_native::Padding; -use iced_style::menu; - pub use iced_native::pick_list::State; pub use iced_style::pick_list::{Style, StyleSheet}; /// A widget allowing the selection of a single value from a list of options. pub type PickList<'a, T, Message, Backend> = iced_native::PickList<'a, T, Message, Renderer>; - -impl iced_native::pick_list::Renderer for Renderer -where - B: Backend + backend::Text, -{ - type Style = Box; - - const DEFAULT_PADDING: Padding = Padding::new(5); - - fn menu_style(style: &Box) -> menu::Style { - style.menu() - } -} -- cgit