Skip to content

Commit

Permalink
Bundle close and open menu icons
Browse files Browse the repository at this point in the history
  • Loading branch information
jackpot51 committed Nov 28, 2023
1 parent 8e99406 commit d6c8fbe
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
4 changes: 2 additions & 2 deletions res/sidebar-active.svg → res/icons/close-menu-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions res/icons/open-menu-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 8 additions & 5 deletions src/widget/nav_bar_toggle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,15 @@ pub fn nav_bar_toggle<Message>() -> NavBarToggle<Message> {
impl<'a, Message: 'static + Clone> From<NavBarToggle<Message>> for Element<'a, Message> {
fn from(nav_bar_toggle: NavBarToggle<Message>) -> Self {
let icon = if nav_bar_toggle.active {
widget::icon::from_svg_bytes(&include_bytes!("../../res/sidebar-active.svg")[..])
.symbolic(true)
widget::icon::from_svg_bytes(
&include_bytes!("../../res/icons/close-menu-symbolic.svg")[..],
)
.symbolic(true)
} else {
widget::icon::from_name("open-menu-symbolic")
.size(16)
.handle()
widget::icon::from_svg_bytes(
&include_bytes!("../../res/icons/open-menu-symbolic.svg")[..],
)
.symbolic(true)
};

widget::button::text("")
Expand Down

0 comments on commit d6c8fbe

Please sign in to comment.