Reimplemented NavigationBar

- Navigation Bar was reimplemented to support sections and pages.
- Created new widget called separator, a horizontal rule with the COSMIC
  theme.
This commit is contained in:
Eduardo Flores 2022-10-13 02:23:37 -07:00 committed by Michael Murphy
parent 420d3c3dfc
commit 07e53ddadd
8 changed files with 390 additions and 383 deletions

View file

@ -16,7 +16,7 @@ pub mod nav_bar {
}};
}
pub fn nav_bar_style(theme: &Theme) -> widget::container::Appearance {
pub fn nav_bar_sections_style(theme: &Theme) -> widget::container::Appearance {
let cosmic = &theme.cosmic().primary;
widget::container::Appearance {
text_color: Some(cosmic.on.into()),
@ -27,5 +27,17 @@ pub mod nav_bar {
}
}
pub fn nav_bar_pages_style(theme: &Theme) -> widget::container::Appearance {
let primary = &theme.cosmic().primary;
let secondary = &theme.cosmic().secondary;
widget::container::Appearance {
text_color: Some(primary.on.into()),
background: Some(Background::Color(secondary.component.base.into())),
border_radius: 8.0,
border_width: 0.0,
border_color: Color::TRANSPARENT,
}
}
pub use nav_button;
}