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:
@ -237,9 +237,11 @@ EditorHelpSearch::EditorHelpSearch() {
|
||||
results_tree->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
results_tree->set_columns(2);
|
||||
results_tree->set_column_title(0, TTR("Name"));
|
||||
results_tree->set_column_clip_content(0, true);
|
||||
results_tree->set_column_title(1, TTR("Member Type"));
|
||||
results_tree->set_column_expand(1, false);
|
||||
results_tree->set_column_custom_minimum_width(1, 150 * EDSCALE);
|
||||
results_tree->set_column_clip_content(1, true);
|
||||
results_tree->set_custom_minimum_size(Size2(0, 100) * EDSCALE);
|
||||
results_tree->set_hide_root(true);
|
||||
results_tree->set_select_mode(Tree::SELECT_ROW);
|
||||
|
||||
Reference in New Issue
Block a user