fix: card button can't be transparent when disabled
This commit is contained in:
parent
5dfac9748d
commit
d1aabecc16
1 changed files with 4 additions and 0 deletions
|
|
@ -122,6 +122,10 @@ impl iced_button::Catalog for Theme {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
iced_button::Status::Disabled => {
|
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 {
|
appearance.background = appearance.background.map(|background| match background {
|
||||||
Background::Color(color) => Background::Color(Color {
|
Background::Color(color) => Background::Color(Color {
|
||||||
a: color.a * 0.5,
|
a: color.a * 0.5,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue