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:
parent
420d3c3dfc
commit
07e53ddadd
8 changed files with 390 additions and 383 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue