Skip to content

Commit e658d2a

Browse files
committed
Merge pull request #109384 from Giganzo/property_selector_search_box
Add icon & clear button to Select Method dialog search bar
2 parents d59cf3e + b2e314e commit e658d2a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

editor/inspector/property_selector.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,10 @@ void PropertySelector::_notification(int p_what) {
519519
case NOTIFICATION_EXIT_TREE: {
520520
disconnect(SceneStringName(confirmed), callable_mp(this, &PropertySelector::_confirmed));
521521
} break;
522+
523+
case NOTIFICATION_THEME_CHANGED: {
524+
search_box->set_right_icon(get_editor_theme_icon(SNAME("Search")));
525+
} break;
522526
}
523527
}
524528

@@ -666,9 +670,11 @@ PropertySelector::PropertySelector() {
666670
add_child(vbc);
667671
//set_child_rect(vbc);
668672
search_box = memnew(LineEdit);
669-
vbc->add_margin_child(TTR("Search:"), search_box);
673+
search_box->set_accessibility_name(TTRC("Search:"));
674+
search_box->set_clear_button_enabled(true);
670675
search_box->connect(SceneStringName(text_changed), callable_mp(this, &PropertySelector::_text_changed));
671676
search_box->connect(SceneStringName(gui_input), callable_mp(this, &PropertySelector::_sbox_input));
677+
vbc->add_margin_child(TTRC("Search:"), search_box);
672678
search_options = memnew(Tree);
673679
search_options->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
674680
vbc->add_margin_child(TTR("Matches:"), search_options, true);

0 commit comments

Comments
 (0)