From edfce89232a41b603cfbb1423e20cb39827622bf Mon Sep 17 00:00:00 2001 From: Michael Alexsander Date: Fri, 16 Jan 2026 11:23:46 -0300 Subject: [PATCH] Add scroll hint to the animation library dialog --- editor/animation/animation_library_editor.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/editor/animation/animation_library_editor.cpp b/editor/animation/animation_library_editor.cpp index 395d832d45..ecab7eb550 100644 --- a/editor/animation/animation_library_editor.cpp +++ b/editor/animation/animation_library_editor.cpp @@ -43,6 +43,7 @@ #include "editor/themes/editor_scale.h" #include "scene/animation/animation_mixer.h" #include "scene/gui/line_edit.h" +#include "scene/gui/margin_container.h" #include "scene/resources/packed_scene.h" void AnimationLibraryEditor::set_animation_mixer(Object *p_mixer) { @@ -1050,9 +1051,13 @@ AnimationLibraryEditor::AnimationLibraryEditor() { load_library_button->connect(SceneStringName(pressed), callable_mp(this, &AnimationLibraryEditor::_load_library)); hb->add_child(load_library_button); vb->add_child(hb); - tree = memnew(Tree); - vb->add_child(tree); + MarginContainer *mc = memnew(MarginContainer); + mc->set_v_size_flags(Control::SIZE_EXPAND_FILL); + mc->set_theme_type_variation("NoBorderHorizontalWindow"); + vb->add_child(mc); + + tree = memnew(Tree); tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED); tree->set_theme_type_variation("TreeTable"); tree->set_columns(2); @@ -1064,8 +1069,8 @@ AnimationLibraryEditor::AnimationLibraryEditor() { tree->set_column_expand(1, false); tree->set_hide_root(true); tree->set_hide_folding(false); - tree->set_v_size_flags(Control::SIZE_EXPAND_FILL); - + tree->set_scroll_hint_mode(Tree::SCROLL_HINT_MODE_BOTTOM); + mc->add_child(tree); tree->connect("item_edited", callable_mp(this, &AnimationLibraryEditor::_item_renamed)); tree->connect("button_clicked", callable_mp(this, &AnimationLibraryEditor::_button_pressed)); tree->connect("item_collapsed", callable_mp(this, &AnimationLibraryEditor::_save_mixer_lib_folding));