diff --git a/src/app/mod.rs b/src/app/mod.rs index 9d175a63..a57da73a 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -733,30 +733,29 @@ impl ApplicationExt for App { if core.window.context_is_overlay && core.window.show_context { if let Some(context) = self.context_drawer() { widgets.push( - Element::from( - crate::widget::context_drawer( - context.title, - context.header_actions, - context.header, - context.footer, - context.on_close, - main_content, - context.content, - context_width, - ) - .apply(|drawer| { - Element::from(id_container( - drawer, - iced_core::id::Id::new("COSMIC_context_drawer"), - )) - }) - .apply(container) - .padding(if content_container { - [0, 8, 8, 0] - } else { - [0, 0, 0, 0] - }), + crate::widget::context_drawer( + context.title, + context.header_actions, + context.header, + context.footer, + context.on_close, + main_content, + context.content, + context_width, ) + .apply(|drawer| { + Element::from(id_container( + drawer, + iced_core::id::Id::new("COSMIC_context_drawer"), + )) + }) + .apply(container) + .padding(if content_container { + [0, 8, 8, 0] + } else { + [0, 0, 0, 0] + }) + .apply(Element::from) .map(Message::App), ); } else { @@ -779,7 +778,7 @@ impl ApplicationExt for App { ); if let Some(context) = self.context_drawer() { widgets.push( - Element::from(crate::widget::ContextDrawer::new_inner( + crate::widget::ContextDrawer::new_inner( context.title, context.header_actions, context.header, @@ -787,7 +786,8 @@ impl ApplicationExt for App { context.content, context.on_close, context_width, - )) + ) + .apply(Element::from) .map(Message::App) .apply(container) .width(context_width) diff --git a/src/widget/mod.rs b/src/widget/mod.rs index f2e3a8e2..52acf06d 100644 --- a/src/widget/mod.rs +++ b/src/widget/mod.rs @@ -119,9 +119,9 @@ pub use color_picker::{ColorPicker, ColorPickerModel}; #[doc(inline)] pub use iced::widget::qr_code; -pub(crate) mod context_drawer; +pub mod context_drawer; #[doc(inline)] -pub(crate) use context_drawer::{context_drawer, ContextDrawer}; +pub use context_drawer::{context_drawer, ContextDrawer}; #[doc(inline)] pub use column::{column, Column};