@@ -137,10 +137,7 @@ void FindReplaceBar::_notification(int p_what) {
137137 case NOTIFICATION_READY: {
138138 find_prev->set_button_icon (get_editor_theme_icon (SNAME (" MoveUp" )));
139139 find_next->set_button_icon (get_editor_theme_icon (SNAME (" MoveDown" )));
140- hide_button->set_texture_normal (get_editor_theme_icon (SNAME (" Close" )));
141- hide_button->set_texture_hover (get_editor_theme_icon (SNAME (" Close" )));
142- hide_button->set_texture_pressed (get_editor_theme_icon (SNAME (" Close" )));
143- hide_button->set_custom_minimum_size (hide_button->get_texture_normal ()->get_size ());
140+ hide_button->set_button_icon (get_editor_theme_icon (SNAME (" Close" )));
144141 _update_toggle_replace_button (replace_text->is_visible_in_tree ());
145142 } break ;
146143
@@ -752,7 +749,7 @@ FindReplaceBar::FindReplaceBar() {
752749 toggle_replace_button->set_focus_mode (FOCUS_NONE);
753750 toggle_replace_button->connect (SceneStringName (pressed), callable_mp (this , &FindReplaceBar::_toggle_replace_pressed));
754751
755- vbc_lineedit = memnew (VBoxContainer);
752+ VBoxContainer * vbc_lineedit = memnew (VBoxContainer);
756753 add_child (vbc_lineedit);
757754 vbc_lineedit->set_alignment (BoxContainer::ALIGNMENT_CENTER);
758755 vbc_lineedit->set_h_size_flags (SIZE_EXPAND_FILL);
@@ -762,18 +759,20 @@ FindReplaceBar::FindReplaceBar() {
762759 add_child (vbc_option);
763760
764761 HBoxContainer *hbc_button_search = memnew (HBoxContainer);
765- vbc_button-> add_child (hbc_button_search );
762+ hbc_button_search-> set_v_size_flags (SIZE_EXPAND_FILL );
766763 hbc_button_search->set_alignment (BoxContainer::ALIGNMENT_END);
764+ vbc_button->add_child (hbc_button_search);
767765 hbc_button_replace = memnew (HBoxContainer);
768- vbc_button-> add_child (hbc_button_replace );
766+ hbc_button_replace-> set_v_size_flags (SIZE_EXPAND_FILL );
769767 hbc_button_replace->set_alignment (BoxContainer::ALIGNMENT_END);
768+ vbc_button->add_child (hbc_button_replace);
770769
771770 HBoxContainer *hbc_option_search = memnew (HBoxContainer);
772771 vbc_option->add_child (hbc_option_search);
773772 hbc_option_replace = memnew (HBoxContainer);
774773 vbc_option->add_child (hbc_option_replace);
775774
776- // Search toolbar
775+ // Search toolbar.
777776 search_text = memnew (LineEdit);
778777 search_text->set_keep_editing_on_text_submit (true );
779778 vbc_lineedit->add_child (search_text);
@@ -813,7 +812,7 @@ FindReplaceBar::FindReplaceBar() {
813812 whole_words->set_focus_mode (FOCUS_NONE);
814813 whole_words->connect (SceneStringName (toggled), callable_mp (this , &FindReplaceBar::_search_options_changed));
815814
816- // Replace toolbar
815+ // Replace toolbar.
817816 replace_text = memnew (LineEdit);
818817 vbc_lineedit->add_child (replace_text);
819818 replace_text->set_placeholder (TTR (" Replace" ));
@@ -837,12 +836,13 @@ FindReplaceBar::FindReplaceBar() {
837836 selection_only->set_focus_mode (FOCUS_NONE);
838837 selection_only->connect (SceneStringName (toggled), callable_mp (this , &FindReplaceBar::_search_options_changed));
839838
840- hide_button = memnew (TextureButton );
841- add_child ( hide_button);
839+ hide_button = memnew (Button );
840+ hide_button-> set_flat ( true );
842841 hide_button->set_tooltip_text (TTR (" Hide" ));
843842 hide_button->set_focus_mode (FOCUS_NONE);
844843 hide_button->connect (SceneStringName (pressed), callable_mp (this , &FindReplaceBar::_hide_bar));
845844 hide_button->set_v_size_flags (SIZE_SHRINK_CENTER);
845+ add_child (hide_button);
846846}
847847
848848/* ** CODE EDITOR ****/
0 commit comments