PreferenceDialog: render filter as native search field#3925
Open
vogella wants to merge 1 commit intoeclipse-platform:masterfrom
Open
PreferenceDialog: render filter as native search field#3925vogella wants to merge 1 commit intoeclipse-platform:masterfrom
vogella wants to merge 1 commit intoeclipse-platform:masterfrom
Conversation
Give the preference dialog's filter field the full set of search-related style bits (SWT.SEARCH | SWT.ICON_SEARCH | SWT.ICON_CANCEL) so it is rendered as a native search field with a magnifier and cancel icon. Also override setInitialText to expose the hint via Text#setMessage only, instead of stuffing it into the field's content. The dialog auto-focuses the filter field on open, so the old initial-text fallback was never actually shown as a placeholder and forced users to delete the hint before typing.
Contributor
Author
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
SWT.SEARCH | SWT.ICON_SEARCH | SWT.ICON_CANCELfor the filter field inFilteredPreferenceDialog'sPreferenceFilteredTree, so it is rendered as a native search field with magnifier and cancel icons.setInitialTextto expose the filter hint viaText#setMessageonly, rather than inserting it as real field content. The dialog auto-focuses the filter field on open, which made the old initial-text fallback behave poorly: users saw the hint as actual text and had to delete it before typing.Test plan