diff options
author | 2021-10-28 15:41:12 +0700 | |
---|---|---|
committer | 2021-10-28 15:41:12 +0700 | |
commit | fe4dfeafdbc8f427bd351f394d27f606a3843b44 (patch) | |
tree | 4ab6cc372315c0f3fda7d06c4a337db59cd64d0f /graphics | |
parent | 687c35e052a1057042fc8ddf4968c3fa35cc6bcf (diff) | |
download | iced-fe4dfeafdbc8f427bd351f394d27f606a3843b44.tar.gz iced-fe4dfeafdbc8f427bd351f394d27f606a3843b44.tar.bz2 iced-fe4dfeafdbc8f427bd351f394d27f606a3843b44.zip |
Wire up style to `PickList` and `overlay::Menu`
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/src/overlay/menu.rs | 11 | ||||
-rw-r--r-- | graphics/src/widget/pick_list.rs | 17 |
2 files changed, 0 insertions, 28 deletions
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<B> overlay::menu::Renderer for Renderer<B> -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<Backend>>; - -impl<B> iced_native::pick_list::Renderer for Renderer<B> -where - B: Backend + backend::Text, -{ - type Style = Box<dyn StyleSheet>; - - const DEFAULT_PADDING: Padding = Padding::new(5); - - fn menu_style(style: &Box<dyn StyleSheet>) -> menu::Style { - style.menu() - } -} |