Skip to content

Commit

Permalink
Fine-tune built-in styling of disabled TextInput
Browse files Browse the repository at this point in the history
  • Loading branch information
hecrj committed Apr 12, 2023
1 parent 6b85488 commit 1de794a
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions style/src/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

0 comments on commit 1de794a

Please sign in to comment.