Add Svg theme for an icon on top of a primary button

This commit is contained in:
Jeremy Soller 2022-12-19 15:42:31 -07:00
parent aa5da36c6e
commit 0c66643c72
No known key found for this signature in database
GPG key ID: 87F211AF2BE4C2FE

View file

@ -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()),
},
}
}
}