Use cosmic-theme values for nav and list styles

This commit is contained in:
Jeremy Soller 2022-09-30 16:24:09 -06:00
parent e7422f2904
commit a59a4de79b
No known key found for this signature in database
GPG key ID: 87F211AF2BE4C2FE
2 changed files with 6 additions and 14 deletions

View file

@ -65,14 +65,10 @@ macro_rules! list_section {
pub use list_section;
pub fn list_section_style(theme: &Theme) -> widget::container::Appearance {
let cosmic = &theme.cosmic().primary;
widget::container::Appearance {
text_color: None,
background: Some(Background::Color(
match theme {
Theme::Dark => Color::from_rgb8(0x27, 0x27, 0x27),
Theme::Light => Color::from_rgb8(0xf7, 0xf7, 0xf7),
}
)),
text_color: Some(cosmic.on.into()),
background: Some(Background::Color(cosmic.base.into())),
border_radius: 8.0,
border_width: 0.0,
border_color: Color::TRANSPARENT,

View file

@ -27,14 +27,10 @@ macro_rules! nav_bar {
pub use nav_bar;
pub fn nav_bar_style(theme: &Theme) -> widget::container::Appearance {
let cosmic = &theme.cosmic().primary;
widget::container::Appearance {
text_color: None,
background: Some(Background::Color(
match theme {
Theme::Dark => Color::from_rgb8(0x29, 0x29, 0x29),
Theme::Light => Color::from_rgb8(0xfd, 0xfd, 0xfd),
}
)),
text_color: Some(cosmic.on.into()),
background: Some(Background::Color(cosmic.base.into())),
border_radius: 8.0,
border_width: 0.0,
border_color: Color::TRANSPARENT,