fix(inline_input): wrong colors for focused style
This commit is contained in:
parent
d8cb87cae7
commit
bd84f1f07d
2 changed files with 7 additions and 8 deletions
|
|
@ -328,8 +328,6 @@ impl StyleSheet for crate::Theme {
|
||||||
border_width: 0.0,
|
border_width: 0.0,
|
||||||
border_offset: None,
|
border_offset: None,
|
||||||
border_color: Color::TRANSPARENT,
|
border_color: Color::TRANSPARENT,
|
||||||
// TODO use regular text color here after text rendering handles multiple colors
|
|
||||||
// in this case, for selected and unselected text
|
|
||||||
icon_color: None,
|
icon_color: None,
|
||||||
text_color: None,
|
text_color: None,
|
||||||
placeholder_color: {
|
placeholder_color: {
|
||||||
|
|
@ -341,15 +339,13 @@ impl StyleSheet for crate::Theme {
|
||||||
label_color: label_color.into(),
|
label_color: label_color.into(),
|
||||||
},
|
},
|
||||||
TextInput::Inline => Appearance {
|
TextInput::Inline => Appearance {
|
||||||
background: Color::from(palette.accent.base).into(),
|
background: Color::TRANSPARENT.into(),
|
||||||
border_radius: corner.radius_0.into(),
|
border_radius: corner.radius_0.into(),
|
||||||
border_width: 0.0,
|
border_width: 0.0,
|
||||||
border_offset: None,
|
border_offset: None,
|
||||||
border_color: Color::TRANSPARENT,
|
border_color: Color::TRANSPARENT,
|
||||||
icon_color: Some(palette.on_accent_color().into()),
|
icon_color: None,
|
||||||
// TODO use regular text color here after text rendering handles multiple colors
|
text_color: None,
|
||||||
// in this case, for selected and unselected text
|
|
||||||
text_color: Some(palette.on_accent_color().into()),
|
|
||||||
placeholder_color: {
|
placeholder_color: {
|
||||||
let color: Color = container.on.into();
|
let color: Color = container.on.into();
|
||||||
color.blend_alpha(background, 0.7)
|
color.blend_alpha(background, 0.7)
|
||||||
|
|
|
||||||
|
|
@ -149,7 +149,10 @@ where
|
||||||
/// Creates a new inline [`TextInput`].
|
/// Creates a new inline [`TextInput`].
|
||||||
///
|
///
|
||||||
/// [`TextInput`]: widget::TextInput
|
/// [`TextInput`]: widget::TextInput
|
||||||
pub fn inline_input<'a, Message>(placeholder: impl Into<Cow<'a, str>>, value: impl Into<Cow<'a, str>>) -> TextInput<'a, Message>
|
pub fn inline_input<'a, Message>(
|
||||||
|
placeholder: impl Into<Cow<'a, str>>,
|
||||||
|
value: impl Into<Cow<'a, str>>,
|
||||||
|
) -> TextInput<'a, Message>
|
||||||
where
|
where
|
||||||
Message: Clone + 'static,
|
Message: Clone + 'static,
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue