From da9b6345d8af4326ba8fb4c268c8670dbba6ff9d Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Tue, 25 Jul 2023 18:56:01 -0700 Subject: [PATCH] Add 'disabled' style for text-input, instead of panicking with `todo!` --- src/theme/mod.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/theme/mod.rs b/src/theme/mod.rs index be997b97..69b945aa 100644 --- a/src/theme/mod.rs +++ b/src/theme/mod.rs @@ -1191,11 +1191,14 @@ impl text_input::StyleSheet for Theme { } fn disabled_color(&self, _style: &Self::Style) -> Color { - todo!() + let palette = self.cosmic(); + let mut neutral_9 = palette.palette.neutral_9; + neutral_9.alpha = 0.5; + neutral_9.into() } - fn disabled(&self, _style: &Self::Style) -> text_input::Appearance { - todo!() + fn disabled(&self, style: &Self::Style) -> text_input::Appearance { + self.active(style) } }