@@ -1444,7 +1444,8 @@ int AnimationTimelineEdit::get_buttons_width() const {
14441444int AnimationTimelineEdit::get_name_limit () const {
14451445 Ref<Texture2D> hsize_icon = get_editor_theme_icon (SNAME (" Hsize" ));
14461446
1447- int limit = MAX (name_limit, add_track->get_minimum_size ().width + hsize_icon->get_width () + 8 * EDSCALE);
1447+ int filter_track_width = filter_track->is_visible () ? filter_track->get_custom_minimum_size ().width : 0 ;
1448+ int limit = MAX (name_limit, add_track->get_minimum_size ().width + hsize_icon->get_width () + filter_track_width + 16 * EDSCALE);
14481449
14491450 limit = MIN (limit, get_size ().width - get_buttons_width () - 1 );
14501451
@@ -1942,10 +1943,10 @@ void AnimationTimelineEdit::gui_input(const Ref<InputEvent> &p_event) {
19421943 if (dragging_hsize) {
19431944 int ofs = mm->get_position ().x - dragging_hsize_from;
19441945 name_limit = dragging_hsize_at + ofs;
1945- int hsize_icon_width = get_editor_theme_icon (SNAME (" Hsize" ))->get_width ();
1946- add_track_hb->set_size (Size2 (name_limit - ((hsize_icon_width + 16 ) * EDSCALE), 0 ));
19471946 // Make sure name_limit is clamped to the range that UI allows.
19481947 name_limit = get_name_limit ();
1948+ int hsize_icon_width = get_editor_theme_icon (SNAME (" Hsize" ))->get_width ();
1949+ add_track_hb->set_size (Size2 (name_limit - ((hsize_icon_width + 16 ) * EDSCALE), 0 ));
19491950 queue_redraw ();
19501951 emit_signal (SNAME (" name_limit_changed" ));
19511952 play_position->queue_redraw ();
@@ -2024,6 +2025,7 @@ AnimationTimelineEdit::AnimationTimelineEdit() {
20242025 add_track_hb->add_child (add_track);
20252026 filter_track = memnew (LineEdit);
20262027 filter_track->set_h_size_flags (SIZE_EXPAND_FILL);
2028+ filter_track->set_custom_minimum_size (Vector2 (120 * EDSCALE, 0 ));
20272029 filter_track->set_placeholder (TTR (" Filter Tracks" ));
20282030 filter_track->set_tooltip_text (TTR (" Filter tracks by entering part of their node name or property." ));
20292031 filter_track->connect (SceneStringName (text_changed), callable_mp ((AnimationTrackEditor *)this , &AnimationTrackEditor::_on_filter_updated));
0 commit comments