From f4a4845ddbdced81ae4ff60bfa19f0e602d84709 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 4 Mar 2024 20:42:37 +0100 Subject: Simplify theming for `Button` widget --- style/src/checkbox.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'style/src/checkbox.rs') diff --git a/style/src/checkbox.rs b/style/src/checkbox.rs index 77093f69..5e1c8374 100644 --- a/style/src/checkbox.rs +++ b/style/src/checkbox.rs @@ -30,15 +30,7 @@ pub trait StyleSheet { let active = self.active(style, is_checked); Appearance { - background: match active.background { - Background::Color(color) => Background::Color(Color { - a: color.a * 0.5, - ..color - }), - Background::Gradient(gradient) => { - Background::Gradient(gradient.mul_alpha(0.5)) - } - }, + background: active.background.transparentize(0.5), ..active } } -- cgit