Use cosmic-theme values for nav and list styles
This commit is contained in:
parent
e7422f2904
commit
a59a4de79b
2 changed files with 6 additions and 14 deletions
|
|
@ -65,14 +65,10 @@ macro_rules! list_section {
|
||||||
pub use list_section;
|
pub use list_section;
|
||||||
|
|
||||||
pub fn list_section_style(theme: &Theme) -> widget::container::Appearance {
|
pub fn list_section_style(theme: &Theme) -> widget::container::Appearance {
|
||||||
|
let cosmic = &theme.cosmic().primary;
|
||||||
widget::container::Appearance {
|
widget::container::Appearance {
|
||||||
text_color: None,
|
text_color: Some(cosmic.on.into()),
|
||||||
background: Some(Background::Color(
|
background: Some(Background::Color(cosmic.base.into())),
|
||||||
match theme {
|
|
||||||
Theme::Dark => Color::from_rgb8(0x27, 0x27, 0x27),
|
|
||||||
Theme::Light => Color::from_rgb8(0xf7, 0xf7, 0xf7),
|
|
||||||
}
|
|
||||||
)),
|
|
||||||
border_radius: 8.0,
|
border_radius: 8.0,
|
||||||
border_width: 0.0,
|
border_width: 0.0,
|
||||||
border_color: Color::TRANSPARENT,
|
border_color: Color::TRANSPARENT,
|
||||||
|
|
|
||||||
|
|
@ -27,14 +27,10 @@ macro_rules! nav_bar {
|
||||||
pub use nav_bar;
|
pub use nav_bar;
|
||||||
|
|
||||||
pub fn nav_bar_style(theme: &Theme) -> widget::container::Appearance {
|
pub fn nav_bar_style(theme: &Theme) -> widget::container::Appearance {
|
||||||
|
let cosmic = &theme.cosmic().primary;
|
||||||
widget::container::Appearance {
|
widget::container::Appearance {
|
||||||
text_color: None,
|
text_color: Some(cosmic.on.into()),
|
||||||
background: Some(Background::Color(
|
background: Some(Background::Color(cosmic.base.into())),
|
||||||
match theme {
|
|
||||||
Theme::Dark => Color::from_rgb8(0x29, 0x29, 0x29),
|
|
||||||
Theme::Light => Color::from_rgb8(0xfd, 0xfd, 0xfd),
|
|
||||||
}
|
|
||||||
)),
|
|
||||||
border_radius: 8.0,
|
border_radius: 8.0,
|
||||||
border_width: 0.0,
|
border_width: 0.0,
|
||||||
border_color: Color::TRANSPARENT,
|
border_color: Color::TRANSPARENT,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue