Merge pull request #41588 from YeldhamDev/proj_editor_search_placeholders

Add placeholders to the searchbars in the Project/Editor settings
This commit is contained in:
Rémi Verschelde 2020-08-29 12:52:19 +02:00 committed by GitHub
commit 731453bc5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -333,6 +333,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
header->add_child(search_bar);
search_box = memnew(LineEdit);
search_box->set_placeholder(TTR("Search"));
search_box->set_h_size_flags(Control::SIZE_EXPAND_FILL);
search_bar->add_child(search_box);

View File

@ -405,6 +405,7 @@ EditorSettingsDialog::EditorSettingsDialog() {
tab_general->add_child(hbc);
search_box = memnew(LineEdit);
search_box->set_placeholder(TTR("Search"));
search_box->set_h_size_flags(Control::SIZE_EXPAND_FILL);
hbc->add_child(search_box);
@ -449,6 +450,7 @@ EditorSettingsDialog::EditorSettingsDialog() {
tab_shortcuts->add_child(hbc);
shortcut_search_box = memnew(LineEdit);
shortcut_search_box->set_placeholder(TTR("Search"));
shortcut_search_box->set_h_size_flags(Control::SIZE_EXPAND_FILL);
hbc->add_child(shortcut_search_box);
shortcut_search_box->connect("text_changed", callable_mp(this, &EditorSettingsDialog::_filter_shortcuts));