@@ -138,10 +138,7 @@ void FindReplaceBar::_notification(int p_what) {
138
138
case NOTIFICATION_READY: {
139
139
find_prev->set_button_icon (get_editor_theme_icon (SNAME (" MoveUp" )));
140
140
find_next->set_button_icon (get_editor_theme_icon (SNAME (" MoveDown" )));
141
- hide_button->set_texture_normal (get_editor_theme_icon (SNAME (" Close" )));
142
- hide_button->set_texture_hover (get_editor_theme_icon (SNAME (" Close" )));
143
- hide_button->set_texture_pressed (get_editor_theme_icon (SNAME (" Close" )));
144
- hide_button->set_custom_minimum_size (hide_button->get_texture_normal ()->get_size ());
141
+ hide_button->set_button_icon (get_editor_theme_icon (SNAME (" Close" )));
145
142
_update_toggle_replace_button (replace_text->is_visible_in_tree ());
146
143
} break ;
147
144
@@ -759,7 +756,7 @@ FindReplaceBar::FindReplaceBar() {
759
756
toggle_replace_button->set_focus_mode (FOCUS_NONE);
760
757
toggle_replace_button->connect (SceneStringName (pressed), callable_mp (this , &FindReplaceBar::_toggle_replace_pressed));
761
758
762
- vbc_lineedit = memnew (VBoxContainer);
759
+ VBoxContainer * vbc_lineedit = memnew (VBoxContainer);
763
760
add_child (vbc_lineedit);
764
761
vbc_lineedit->set_alignment (BoxContainer::ALIGNMENT_CENTER);
765
762
vbc_lineedit->set_h_size_flags (SIZE_EXPAND_FILL);
@@ -769,18 +766,20 @@ FindReplaceBar::FindReplaceBar() {
769
766
add_child (vbc_option);
770
767
771
768
HBoxContainer *hbc_button_search = memnew (HBoxContainer);
772
- vbc_button-> add_child (hbc_button_search );
769
+ hbc_button_search-> set_v_size_flags (SIZE_EXPAND_FILL );
773
770
hbc_button_search->set_alignment (BoxContainer::ALIGNMENT_END);
771
+ vbc_button->add_child (hbc_button_search);
774
772
hbc_button_replace = memnew (HBoxContainer);
775
- vbc_button-> add_child (hbc_button_replace );
773
+ hbc_button_replace-> set_v_size_flags (SIZE_EXPAND_FILL );
776
774
hbc_button_replace->set_alignment (BoxContainer::ALIGNMENT_END);
775
+ vbc_button->add_child (hbc_button_replace);
777
776
778
777
HBoxContainer *hbc_option_search = memnew (HBoxContainer);
779
778
vbc_option->add_child (hbc_option_search);
780
779
hbc_option_replace = memnew (HBoxContainer);
781
780
vbc_option->add_child (hbc_option_replace);
782
781
783
- // Search toolbar
782
+ // Search toolbar.
784
783
search_text = memnew (LineEdit);
785
784
search_text->set_keep_editing_on_text_submit (true );
786
785
vbc_lineedit->add_child (search_text);
@@ -824,7 +823,7 @@ FindReplaceBar::FindReplaceBar() {
824
823
whole_words->set_focus_mode (FOCUS_NONE);
825
824
whole_words->connect (SceneStringName (toggled), callable_mp (this , &FindReplaceBar::_search_options_changed));
826
825
827
- // Replace toolbar
826
+ // Replace toolbar.
828
827
replace_text = memnew (LineEdit);
829
828
vbc_lineedit->add_child (replace_text);
830
829
replace_text->set_placeholder (TTR (" Replace" ));
@@ -849,13 +848,14 @@ FindReplaceBar::FindReplaceBar() {
849
848
selection_only->set_focus_mode (FOCUS_NONE);
850
849
selection_only->connect (SceneStringName (toggled), callable_mp (this , &FindReplaceBar::_search_options_changed));
851
850
852
- hide_button = memnew (TextureButton );
853
- add_child ( hide_button);
851
+ hide_button = memnew (Button );
852
+ hide_button-> set_flat ( true );
854
853
hide_button->set_tooltip_text (TTR (" Hide" ));
855
854
hide_button->set_accessibility_name (TTRC (" Hide" ));
856
855
hide_button->set_focus_mode (FOCUS_NONE);
857
856
hide_button->connect (SceneStringName (pressed), callable_mp (this , &FindReplaceBar::_hide_bar));
858
857
hide_button->set_v_size_flags (SIZE_SHRINK_CENTER);
858
+ add_child (hide_button);
859
859
}
860
860
861
861
/* ** CODE EDITOR ****/
0 commit comments