improv(context_drawer): move title out of header row
This moves the title below the header row containing actions and the close button, allowing more room for the title and actions. Also makes actions an `Element` instead of a `Vec<Element>`, providing more flexibility for developers.
This commit is contained in:
parent
2299b46862
commit
b6c6d1cb7b
4 changed files with 60 additions and 91 deletions
|
|
@ -15,9 +15,9 @@ use crate::Element;
|
|||
/// An overlayed widget that attaches a toggleable context drawer to the view.
|
||||
pub fn context_drawer<'a, Message: Clone + 'static, Content, Drawer>(
|
||||
title: Option<Cow<'a, str>>,
|
||||
header_actions: Vec<Element<'a, Message>>,
|
||||
header_opt: Option<Element<'a, Message>>,
|
||||
footer_opt: Option<Element<'a, Message>>,
|
||||
actions: Option<Element<'a, Message>>,
|
||||
header: Option<Element<'a, Message>>,
|
||||
footer: Option<Element<'a, Message>>,
|
||||
on_close: Message,
|
||||
content: Content,
|
||||
drawer: Drawer,
|
||||
|
|
@ -28,13 +28,6 @@ where
|
|||
Drawer: Into<Element<'a, Message>>,
|
||||
{
|
||||
ContextDrawer::new(
|
||||
title,
|
||||
header_actions,
|
||||
header_opt,
|
||||
footer_opt,
|
||||
content,
|
||||
drawer,
|
||||
on_close,
|
||||
max_width,
|
||||
title, actions, header, footer, content, drawer, on_close, max_width,
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue