Merge pull request #49917 from groud/tree_disable_scroll

Allow disabling scrolling in Tree and implement horizontal scrolling
This commit is contained in:
Rémi Verschelde 2021-06-28 18:41:23 +02:00 committed by GitHub
commit 89f270f4c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 267 additions and 122 deletions

View file

@ -569,8 +569,8 @@ void AnimationPlayerEditor::_animation_blend() {
blend_editor.dialog->popup_centered(Size2(400, 400) * EDSCALE);
blend_editor.tree->set_hide_root(true);
blend_editor.tree->set_column_min_width(0, 10);
blend_editor.tree->set_column_min_width(1, 3);
blend_editor.tree->set_column_custom_minimum_width(0, 10);
blend_editor.tree->set_column_custom_minimum_width(1, 3);
List<StringName> anims;
player->get_animation_list(&anims);

View file

@ -367,8 +367,8 @@ ResourcePreloaderEditor::ResourcePreloaderEditor() {
tree = memnew(Tree);
tree->connect("button_pressed", callable_mp(this, &ResourcePreloaderEditor::_cell_button_pressed));
tree->set_columns(2);
tree->set_column_min_width(0, 2);
tree->set_column_min_width(1, 3);
tree->set_column_custom_minimum_width(0, 2);
tree->set_column_custom_minimum_width(1, 3);
tree->set_column_expand(0, true);
tree->set_column_expand(1, true);
tree->set_v_size_flags(SIZE_EXPAND_FILL);

View file

@ -932,9 +932,9 @@ ThemeItemImportTree::ThemeItemImportTree() {
import_items_tree->set_column_expand(0, true);
import_items_tree->set_column_expand(IMPORT_ITEM, false);
import_items_tree->set_column_expand(IMPORT_ITEM_DATA, false);
import_items_tree->set_column_min_width(0, 160 * EDSCALE);
import_items_tree->set_column_min_width(IMPORT_ITEM, 80 * EDSCALE);
import_items_tree->set_column_min_width(IMPORT_ITEM_DATA, 80 * EDSCALE);
import_items_tree->set_column_custom_minimum_width(0, 160 * EDSCALE);
import_items_tree->set_column_custom_minimum_width(IMPORT_ITEM, 80 * EDSCALE);
import_items_tree->set_column_custom_minimum_width(IMPORT_ITEM_DATA, 80 * EDSCALE);
ScrollContainer *import_bulk_sc = memnew(ScrollContainer);
import_bulk_sc->set_custom_minimum_size(Size2(260.0, 0.0) * EDSCALE);