From d1aabecc160f26f860122dd0e52256085fb24f4b Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Wed, 23 Oct 2024 18:36:19 -0400 Subject: [PATCH] fix: card button can't be transparent when disabled --- src/theme/style/iced.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/theme/style/iced.rs b/src/theme/style/iced.rs index 73be6930..79b7dde2 100644 --- a/src/theme/style/iced.rs +++ b/src/theme/style/iced.rs @@ -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,