Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tint color for Textfields #1229

Closed
mohpor opened this issue May 18, 2019 · 2 comments
Closed

tint color for Textfields #1229

mohpor opened this issue May 18, 2019 · 2 comments

Comments

@mohpor
Copy link
Contributor

mohpor commented May 18, 2019

Hi,

Material 3.x introduces a bug where the tint color of a text field will be ignored completely, because, you are changing it based on placeholder's colors (Active/Normal) in the process. It has consequences for someone who doesn't have a placeholder and want to set the tint color.

I guess the tint color explicitly set by user should override such behavior.

For now, the workaround is to set both placeholderActiveColor and placeholderNormalColor to your desired color to achieve a simple tintColor!

Update:
I guess this is not new and has been a case since Material 2 (at least)

@OrkhanAlikhanov
Copy link
Contributor

We forceable update tintColor to a single value placeholderActiveColor.

func updatePlaceholderLabelColor() {
tintColor = placeholderActiveColor
placeholderLabel.textColor = isEditing ? placeholderActiveColor : placeholderNormalColor
}

I think we can set it once in didSet of placeholderActiveColor.

@DanielDahan What do you think worth updating?

@daniel-jonathan
Copy link
Member

@OrkhanAlikhanov I think @mohpor's point is a really good one. Maybe we only need to update both values like @mohpor mentioned when a user sets the tintColor. We still do want to use the placeholder(Active/Normal)Color functionality. Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants