apply suggestions
This commit is contained in:
parent
e043b9d9b9
commit
7ee61965a7
2 changed files with 27 additions and 27 deletions
|
|
@ -733,30 +733,29 @@ impl<App: Application> ApplicationExt for App {
|
||||||
if core.window.context_is_overlay && core.window.show_context {
|
if core.window.context_is_overlay && core.window.show_context {
|
||||||
if let Some(context) = self.context_drawer() {
|
if let Some(context) = self.context_drawer() {
|
||||||
widgets.push(
|
widgets.push(
|
||||||
Element::from(
|
crate::widget::context_drawer(
|
||||||
crate::widget::context_drawer(
|
context.title,
|
||||||
context.title,
|
context.header_actions,
|
||||||
context.header_actions,
|
context.header,
|
||||||
context.header,
|
context.footer,
|
||||||
context.footer,
|
context.on_close,
|
||||||
context.on_close,
|
main_content,
|
||||||
main_content,
|
context.content,
|
||||||
context.content,
|
context_width,
|
||||||
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(|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),
|
.map(Message::App),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -779,7 +778,7 @@ impl<App: Application> ApplicationExt for App {
|
||||||
);
|
);
|
||||||
if let Some(context) = self.context_drawer() {
|
if let Some(context) = self.context_drawer() {
|
||||||
widgets.push(
|
widgets.push(
|
||||||
Element::from(crate::widget::ContextDrawer::new_inner(
|
crate::widget::ContextDrawer::new_inner(
|
||||||
context.title,
|
context.title,
|
||||||
context.header_actions,
|
context.header_actions,
|
||||||
context.header,
|
context.header,
|
||||||
|
|
@ -787,7 +786,8 @@ impl<App: Application> ApplicationExt for App {
|
||||||
context.content,
|
context.content,
|
||||||
context.on_close,
|
context.on_close,
|
||||||
context_width,
|
context_width,
|
||||||
))
|
)
|
||||||
|
.apply(Element::from)
|
||||||
.map(Message::App)
|
.map(Message::App)
|
||||||
.apply(container)
|
.apply(container)
|
||||||
.width(context_width)
|
.width(context_width)
|
||||||
|
|
|
||||||
|
|
@ -119,9 +119,9 @@ pub use color_picker::{ColorPicker, ColorPickerModel};
|
||||||
#[doc(inline)]
|
#[doc(inline)]
|
||||||
pub use iced::widget::qr_code;
|
pub use iced::widget::qr_code;
|
||||||
|
|
||||||
pub(crate) mod context_drawer;
|
pub mod context_drawer;
|
||||||
#[doc(inline)]
|
#[doc(inline)]
|
||||||
pub(crate) use context_drawer::{context_drawer, ContextDrawer};
|
pub use context_drawer::{context_drawer, ContextDrawer};
|
||||||
|
|
||||||
#[doc(inline)]
|
#[doc(inline)]
|
||||||
pub use column::{column, Column};
|
pub use column::{column, Column};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue