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

Add clear button to settings search bar #3403

Merged
merged 5 commits into from
Dec 26, 2021

Conversation

acdvs
Copy link
Contributor

@acdvs acdvs commented Dec 13, 2021

Pull request checklist:

  • CHANGELOG.md was updated, if applicable

Description

Adds an "x" icon to the right side of the settings search bar for easy unfiltering with a single click. When nothing is entered, the button darkens, and upon typing, the button brightens.

clear_search

I decided to give this a go because text inputs (no matter where) that auto-filter something as the user types typically make more sense UX-wise if they have a clear button to undo the filtering.

@Mm2PL Mm2PL self-requested a review December 13, 2021 15:25
Copy link
Collaborator

@Felanbird Felanbird left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functionality works as intended. 👍

I also tested it with Arabic characters on a whim and the button correctly jumps to the left side and is still clickable.

@kornes
Copy link
Contributor

kornes commented Dec 13, 2021

Qt has clearButtonEnabled for inputs, the only difference is button disappear instead of graying out
https://doc.qt.io/qt-5/qlineedit.html#clearButtonEnabled-prop

@acdvs
Copy link
Contributor Author

acdvs commented Dec 19, 2021

I was able to find a way to use QLineEdit::setClearButtonEnabled with a custom image, so I've updated to that. Much simpler.

@pajlada
Copy link
Member

pajlada commented Dec 26, 2021

Good addition, thank you!

@pajlada pajlada enabled auto-merge (squash) December 26, 2021 14:01
@pajlada pajlada merged commit f64047d into Chatterino:master Dec 26, 2021
zneix added a commit to SevenTV/chatterino7 that referenced this pull request Dec 26, 2021
Now we're on commit f64047d; Changes from upstream we've pulled

- Minor: Added clear button to settings search bar. (Chatterino#3403)
- Minor: Added autocompletion for default Twitch commands starting with the dot (e.g. `.mods` which does the same as `/mods`). (Chatterino#3144)
- Bugfix: Fixed character counter changing fonts after going over the limit. (Chatterino#3422)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants