feat: update the headerbar to match figma
i don't think the alpha is actually working for the icon, but the color should match
This commit is contained in:
parent
6a97435263
commit
05a9e7639f
3 changed files with 16 additions and 8 deletions
|
|
@ -13,6 +13,8 @@ pub struct NavBarToggle<Message> {
|
|||
active: bool,
|
||||
#[setters(strip_option)]
|
||||
on_toggle: Option<Message>,
|
||||
style: crate::theme::Button,
|
||||
selected: bool,
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
|
|
@ -20,6 +22,8 @@ pub fn nav_bar_toggle<Message>() -> NavBarToggle<Message> {
|
|||
NavBarToggle {
|
||||
active: false,
|
||||
on_toggle: None,
|
||||
style: crate::theme::Button::Text,
|
||||
selected: false,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -37,10 +41,11 @@ impl<'a, Message: 'static + Clone> From<NavBarToggle<Message>> for Element<'a, M
|
|||
.symbolic(true)
|
||||
};
|
||||
|
||||
widget::button::text("")
|
||||
.leading_icon(icon)
|
||||
widget::button::icon(icon)
|
||||
.padding([8, 16, 8, 16])
|
||||
.on_press_maybe(nav_bar_toggle.on_toggle)
|
||||
.selected(nav_bar_toggle.selected)
|
||||
.style(nav_bar_toggle.style)
|
||||
.apply(widget::container)
|
||||
.center_y()
|
||||
.height(Length::Fill)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue