Cosmic example: Add Tab navagation
This commit is contained in:
parent
1554a1ee03
commit
59edb3bbf1
3 changed files with 63 additions and 10 deletions
|
|
@ -212,6 +212,24 @@ impl button::StyleSheet for Theme {
|
|||
..active
|
||||
}
|
||||
}
|
||||
|
||||
fn focused(&self, style: &Self::Style) -> button::Appearance {
|
||||
if let Button::Custom { hover, .. } = style {
|
||||
return hover(self);
|
||||
}
|
||||
|
||||
let active = self.active(style);
|
||||
let cosmic = style.cosmic(self);
|
||||
|
||||
button::Appearance {
|
||||
background: match style {
|
||||
Button::Link => None,
|
||||
Button::LinkActive => Some(Background::Color(cosmic.divider.into())),
|
||||
_ => Some(Background::Color(cosmic.hover.into())),
|
||||
},
|
||||
..active
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue