summaryrefslogtreecommitdiffstats
path: root/style/src/checkbox.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-04 20:42:37 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-04 20:42:37 +0100
commitf4a4845ddbdced81ae4ff60bfa19f0e602d84709 (patch)
treeb532017384eb9e43e57bf73be372aea0d55af652 /style/src/checkbox.rs
parentdb92e1c942154bee474fee5e2c187f8a52a1bb96 (diff)
downloadiced-f4a4845ddbdced81ae4ff60bfa19f0e602d84709.tar.gz
iced-f4a4845ddbdced81ae4ff60bfa19f0e602d84709.tar.bz2
iced-f4a4845ddbdced81ae4ff60bfa19f0e602d84709.zip
Simplify theming for `Button` widget
Diffstat (limited to 'style/src/checkbox.rs')
-rw-r--r--style/src/checkbox.rs10
1 files changed, 1 insertions, 9 deletions
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
}
}