Fine-tune built-in styling of disabled TextInput

This commit is contained in:
Héctor Ramón Jiménez 2023-04-12 04:34:37 +02:00
parent 6b8548869e
commit 1de794aabf
No known key found for this signature in database
GPG key ID: 140CC052C94F138E

View file

@ -1102,21 +1102,19 @@ impl text_input::StyleSheet for Theme {
let palette = self.extended_palette();
text_input::Appearance {
background: palette.background.base.color.into(),
background: palette.background.weak.color.into(),
border_radius: 2.0,
border_width: 1.0,
border_color: palette.background.weak.color,
icon_color: palette.background.weak.color,
border_color: palette.background.strong.color,
icon_color: palette.background.strong.color,
}
}
fn disabled_color(&self, style: &Self::Style) -> Color {
if let TextInput::Custom(custom) = style {
return custom.value_color(self);
return custom.disabled_color(self);
}
let palette = self.extended_palette();
palette.secondary.strong.color
self.placeholder_color(style)
}
}