feat: add overlay option to appearance for vertical icon button

This commit is contained in:
Ashley Wulber 2024-07-17 15:16:43 -04:00 committed by Michael Murphy
parent 47dedfde74
commit 6f2c893cf5
4 changed files with 30 additions and 1 deletions

View file

@ -73,9 +73,14 @@ pub fn appearance(
Button::Icon | Button::IconVertical | Button::HeaderBar => {
if matches!(style, Button::IconVertical) {
corner_radii = &cosmic.corner_radii.radius_m;
if selected {
appearance.overlay = Some(Background::Color(Color::from(
cosmic.icon_button.selected_state_color(),
)));
}
}
let (background, text, icon) = color(&cosmic.icon_button);
let (background, _text, _icon) = color(&cosmic.icon_button);
appearance.background = Some(Background::Color(background));
}