diff options
author | reduz <reduzio@gmail.com> | 2021-07-04 00:13:28 -0300 |
---|---|---|
committer | reduz <reduzio@gmail.com> | 2021-07-04 13:13:53 -0300 |
commit | f4379cbc82cfe915e97a8e879567b820a10198f4 (patch) | |
tree | 92cae1389f40b23c1bac667e29c03295e63ad788 /editor/debugger/editor_profiler.cpp | |
parent | 5c3055e0fe363e08e8cdd3f922313ec9dacfaf43 (diff) | |
download | redot-engine-f4379cbc82cfe915e97a8e879567b820a10198f4.tar.gz |
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.
Diffstat (limited to 'editor/debugger/editor_profiler.cpp')
-rw-r--r-- | editor/debugger/editor_profiler.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/editor/debugger/editor_profiler.cpp b/editor/debugger/editor_profiler.cpp index ba84040b0c..5f4d1b6f36 100644 --- a/editor/debugger/editor_profiler.cpp +++ b/editor/debugger/editor_profiler.cpp @@ -631,13 +631,16 @@ EditorProfiler::EditorProfiler() { variables->set_column_titles_visible(true); variables->set_column_title(0, TTR("Name")); variables->set_column_expand(0, true); - variables->set_column_custom_minimum_width(0, 60 * EDSCALE); + variables->set_column_clip_content(0, true); + variables->set_column_expand_ratio(0, 60); variables->set_column_title(1, TTR("Time")); variables->set_column_expand(1, false); - variables->set_column_custom_minimum_width(1, 100 * EDSCALE); + variables->set_column_clip_content(1, true); + variables->set_column_expand_ratio(1, 100); variables->set_column_title(2, TTR("Calls")); variables->set_column_expand(2, false); - variables->set_column_custom_minimum_width(2, 60 * EDSCALE); + variables->set_column_clip_content(2, true); + variables->set_column_expand_ratio(2, 60); variables->connect("item_edited", callable_mp(this, &EditorProfiler::_item_edited)); graph = memnew(TextureRect); |