@@ -706,15 +706,19 @@ FindInFilesPanel::FindInFilesPanel() {
706706 hbc->add_child (find_label);
707707
708708 _search_text_label = memnew (Label);
709+ _search_text_label->set_text_overrun_behavior (TextServer::OVERRUN_TRIM_ELLIPSIS);
710+ _search_text_label->set_h_size_flags (Control::SIZE_EXPAND_FILL);
709711 _search_text_label->set_focus_mode (FOCUS_ACCESSIBILITY);
712+ _search_text_label->set_mouse_filter (Control::MOUSE_FILTER_PASS);
710713 _search_text_label->set_auto_translate_mode (AUTO_TRANSLATE_MODE_DISABLED);
711714 hbc->add_child (_search_text_label);
712715
713716 _progress_bar = memnew (ProgressBar);
714717 _progress_bar->set_h_size_flags (SIZE_EXPAND_FILL);
715718 _progress_bar->set_v_size_flags (SIZE_SHRINK_CENTER);
719+ _progress_bar->set_stretch_ratio (2.0 );
720+ _progress_bar->set_visible (false );
716721 hbc->add_child (_progress_bar);
717- set_progress_visible (false );
718722
719723 _status_label = memnew (Label);
720724 _status_label->set_focus_mode (FOCUS_ACCESSIBILITY);
@@ -812,9 +816,13 @@ void FindInFilesPanel::start_search() {
812816
813817 _status_label->set_text (TTRC (" Searching..." ));
814818 _search_text_label->set_text (_finder->get_search_text ());
819+ _search_text_label->set_tooltip_text (_finder->get_search_text ());
820+
821+ int label_min_width = _search_text_label->get_minimum_size ().x + _search_text_label->get_character_bounds (0 ).size .x ;
822+ _search_text_label->set_custom_minimum_size (Size2 (label_min_width, 0 ));
815823
816824 set_process (true );
817- set_progress_visible (true );
825+ _progress_bar-> set_visible (true );
818826
819827 _finder->start ();
820828
@@ -828,7 +836,7 @@ void FindInFilesPanel::stop_search() {
828836
829837 _status_label->set_text (" " );
830838 update_replace_buttons ();
831- set_progress_visible (false );
839+ _progress_bar-> set_visible (false );
832840 _refresh_button->show ();
833841 _cancel_button->hide ();
834842}
@@ -967,7 +975,7 @@ void FindInFilesPanel::_on_item_edited() {
967975void FindInFilesPanel::_on_finished () {
968976 update_matches_text ();
969977 update_replace_buttons ();
970- set_progress_visible (false );
978+ _progress_bar-> set_visible (false );
971979 _refresh_button->show ();
972980 _cancel_button->hide ();
973981}
@@ -1178,10 +1186,6 @@ void FindInFilesPanel::update_matches_text() {
11781186 _status_label->set_text (results_text);
11791187}
11801188
1181- void FindInFilesPanel::set_progress_visible (bool p_visible) {
1182- _progress_bar->set_self_modulate (Color (1 , 1 , 1 , p_visible ? 1 : 0 ));
1183- }
1184-
11851189void FindInFilesPanel::_bind_methods () {
11861190 ClassDB::bind_method (" _on_result_found" , &FindInFilesPanel::_on_result_found);
11871191 ClassDB::bind_method (" _on_finished" , &FindInFilesPanel::_on_finished);
0 commit comments