summaryrefslogtreecommitdiffstats
path: root/style/src/checkbox.rs
diff options
context:
space:
mode:
Diffstat (limited to 'style/src/checkbox.rs')
-rw-r--r--style/src/checkbox.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/style/src/checkbox.rs b/style/src/checkbox.rs
index e84dfd18..3c645f15 100644
--- a/style/src/checkbox.rs
+++ b/style/src/checkbox.rs
@@ -13,15 +13,15 @@ pub struct Style {
/// A set of rules that dictate the style of a checkbox.
pub trait StyleSheet {
- fn active(&self) -> Style;
+ fn active(&self, is_checked: bool) -> Style;
- fn hovered(&self) -> Style;
+ fn hovered(&self, is_checked: bool) -> Style;
}
struct Default;
impl StyleSheet for Default {
- fn active(&self) -> Style {
+ fn active(&self, _is_checked: bool) -> Style {
Style {
background: Background::Color(Color::from_rgb(0.95, 0.95, 0.95)),
checkmark_color: Color::from_rgb(0.3, 0.3, 0.3),
@@ -31,10 +31,10 @@ impl StyleSheet for Default {
}
}
- fn hovered(&self) -> Style {
+ fn hovered(&self, is_checked: bool) -> Style {
Style {
background: Background::Color(Color::from_rgb(0.90, 0.90, 0.90)),
- ..self.active()
+ ..self.active(is_checked)
}
}
}