Add scroll hint to the animation library dialog

This commit is contained in:
Michael Alexsander
2026-01-16 11:23:46 -03:00
parent 1549d51865
commit edfce89232
@@ -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));