Add leftover scroll hints, and panels for scrollables without hints

This commit is contained in:
Michael Alexsander
2025-12-09 18:09:45 -03:00
parent 1cf3180537
commit 5246b5fba9
18 changed files with 87 additions and 28 deletions

View File

@@ -37,6 +37,7 @@
#include "scene/gui/grid_container.h"
#include "scene/gui/label.h"
#include "scene/gui/line_edit.h"
#include "scene/gui/margin_container.h"
#include "scene/gui/popup_menu.h"
#include "scene/gui/separator.h"
#include "scene/gui/spin_box.h"
@@ -370,8 +371,12 @@ RunInstancesDialog::RunInstancesDialog() {
enable_multiple_instances_checkbox->connect(SceneStringName(toggled), callable_mp(instance_count, &SpinBox::set_editable));
instance_count->set_editable(enable_multiple_instances_checkbox->is_pressed());
MarginContainer *mc = memnew(MarginContainer);
mc->set_theme_type_variation("NoBorderHorizontalWindow");
mc->set_v_size_flags(Control::SIZE_EXPAND_FILL);
main_vb->add_child(mc);
instance_tree = memnew(Tree);
instance_tree->set_v_size_flags(Control::SIZE_EXPAND_FILL);
instance_tree->set_h_scroll_enabled(false);
instance_tree->set_columns(4);
instance_tree->set_column_titles_visible(true);
@@ -383,6 +388,7 @@ RunInstancesDialog::RunInstancesDialog() {
instance_tree->set_column_title(COLUMN_FEATURE_TAGS, TTR("Feature Tags"));
instance_tree->set_hide_root(true);
instance_tree->set_allow_rmb_select(true);
instance_tree->set_scroll_hint_mode(Tree::SCROLL_HINT_MODE_BOTTOM);
popup_menu = memnew(PopupMenu);
popup_menu->connect(SceneStringName(id_pressed), callable_mp(this, &RunInstancesDialog::_instance_menu_id_pressed));
@@ -390,7 +396,7 @@ RunInstancesDialog::RunInstancesDialog() {
instance_tree->connect("item_mouse_selected", callable_mp(this, &RunInstancesDialog::_instance_tree_rmb));
instance_tree->connect("empty_clicked", callable_mp(this, &RunInstancesDialog::_instance_tree_rmb));
main_vb->add_child(instance_tree);
mc->add_child(instance_tree);
_refresh_argument_count();
instance_tree->connect("item_edited", callable_mp(this, &RunInstancesDialog::_start_instance_timer));