You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-04 19:21:46 +00:00
Clean up Tree
Fixes some problems introduced by #49917 * Tree used minimum size as a stretch ratio, so it forced a minimum size of 1. * Minimum size redone, stretch ratio moved to a separate setting * Fitting to contents was enforced, this is more intuitive, but in many situations this is undesired. * Added a clip content option for situations where fit to contents does not apply. * Icon would scroll with the item, making it invislbe if the item is too long. * Made icon always appear to the right (or left if RTL is enabled) of the visible item space.
This commit is contained in:
@@ -367,8 +367,10 @@ ResourcePreloaderEditor::ResourcePreloaderEditor() {
|
||||
tree = memnew(Tree);
|
||||
tree->connect("button_pressed", callable_mp(this, &ResourcePreloaderEditor::_cell_button_pressed));
|
||||
tree->set_columns(2);
|
||||
tree->set_column_custom_minimum_width(0, 2);
|
||||
tree->set_column_custom_minimum_width(1, 3);
|
||||
tree->set_column_expand_ratio(0, 2);
|
||||
tree->set_column_clip_content(0, true);
|
||||
tree->set_column_expand_ratio(1, 3);
|
||||
tree->set_column_clip_content(1, true);
|
||||
tree->set_column_expand(0, true);
|
||||
tree->set_column_expand(1, true);
|
||||
tree->set_v_size_flags(SIZE_EXPAND_FILL);
|
||||
|
||||
Reference in New Issue
Block a user