fix: card button can't be transparent when disabled

This commit is contained in:
Ashley Wulber 2024-10-23 18:36:19 -04:00
parent a14132af45
commit 7820914c9e
No known key found for this signature in database
GPG key ID: 5216D4F46A90A820

View file

@ -122,6 +122,10 @@ impl iced_button::Catalog for Theme {
};
}
iced_button::Status::Disabled => {
// Card color is not transparent when it isn't clickable
if matches!(class, Button::Card) {
return appearance;
}
appearance.background = appearance.background.map(|background| match background {
Background::Color(color) => Background::Color(Color {
a: color.a * 0.5,