Add Svg theme for an icon on top of a primary button
This commit is contained in:
parent
9607d213a1
commit
e8291584c4
1 changed files with 7 additions and 1 deletions
|
|
@ -710,6 +710,8 @@ pub enum Svg {
|
|||
Symbolic,
|
||||
/// Icon fill color will match accent color
|
||||
SymbolicActive,
|
||||
/// Icon fill color will match on primary color
|
||||
SymbolicPrimary,
|
||||
}
|
||||
|
||||
impl Hash for Svg {
|
||||
|
|
@ -718,7 +720,8 @@ impl Hash for Svg {
|
|||
Svg::Custom(_) => 0,
|
||||
Svg::Default => 1,
|
||||
Svg::Symbolic => 2,
|
||||
Svg::SymbolicActive => 3
|
||||
Svg::SymbolicActive => 3,
|
||||
Svg::SymbolicPrimary => 4,
|
||||
};
|
||||
|
||||
id.hash(state);
|
||||
|
|
@ -738,6 +741,9 @@ impl svg::StyleSheet for Theme {
|
|||
Svg::SymbolicActive => svg::Appearance {
|
||||
color: Some(self.cosmic().accent.base.into()),
|
||||
},
|
||||
Svg::SymbolicPrimary => svg::Appearance {
|
||||
color: Some(self.cosmic().accent.on.into()),
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue