refactor(theme): create Container::List style variant
This commit is contained in:
parent
db5d989972
commit
85898347e2
2 changed files with 17 additions and 19 deletions
|
|
@ -374,6 +374,7 @@ pub enum Container {
|
|||
Dialog,
|
||||
Dropdown,
|
||||
HeaderBar,
|
||||
List,
|
||||
Primary,
|
||||
Secondary,
|
||||
Tooltip,
|
||||
|
|
@ -457,6 +458,21 @@ impl container::StyleSheet for Theme {
|
|||
shadow: Shadow::default(),
|
||||
},
|
||||
|
||||
Container::List => {
|
||||
let component = &self.current_container().component;
|
||||
|
||||
container::Appearance {
|
||||
icon_color: Some(component.on.into()),
|
||||
text_color: Some(component.on.into()),
|
||||
background: Some(Background::Color(component.base.into())),
|
||||
border: iced::Border {
|
||||
radius: cosmic.corner_radii.radius_s.into(),
|
||||
..Default::default()
|
||||
},
|
||||
shadow: Shadow::default(),
|
||||
}
|
||||
}
|
||||
|
||||
Container::HeaderBar => container::Appearance {
|
||||
icon_color: Some(Color::from(cosmic.accent.base)),
|
||||
text_color: Some(Color::from(cosmic.background.on)),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue