Merge pull request #77796 from MewPurPur/yeah-no-one-needs-exaseconds
Fix profilers' GUI trees
This commit is contained in:
commit
d214dc5a0c
|
@ -660,15 +660,15 @@ EditorProfiler::EditorProfiler() {
|
|||
variables->set_column_title(0, TTR("Name"));
|
||||
variables->set_column_expand(0, true);
|
||||
variables->set_column_clip_content(0, true);
|
||||
variables->set_column_expand_ratio(0, 60);
|
||||
variables->set_column_custom_minimum_width(0, 60);
|
||||
variables->set_column_title(1, TTR("Time"));
|
||||
variables->set_column_expand(1, false);
|
||||
variables->set_column_clip_content(1, true);
|
||||
variables->set_column_expand_ratio(1, 100);
|
||||
variables->set_column_custom_minimum_width(1, 75 * EDSCALE);
|
||||
variables->set_column_title(2, TTR("Calls"));
|
||||
variables->set_column_expand(2, false);
|
||||
variables->set_column_clip_content(2, true);
|
||||
variables->set_column_expand_ratio(2, 60);
|
||||
variables->set_column_custom_minimum_width(2, 50 * EDSCALE);
|
||||
variables->connect("item_edited", callable_mp(this, &EditorProfiler::_item_edited));
|
||||
|
||||
graph = memnew(TextureRect);
|
||||
|
|
|
@ -114,7 +114,7 @@ String EditorVisualProfiler::_get_time_as_text(float p_time) {
|
|||
int dmode = display_mode->get_selected();
|
||||
|
||||
if (dmode == DISPLAY_FRAME_TIME) {
|
||||
return TS->format_number(rtos(p_time)) + " " + RTR("ms");
|
||||
return TS->format_number(String::num(p_time, 2)) + " " + RTR("ms");
|
||||
} else if (dmode == DISPLAY_FRAME_PERCENT) {
|
||||
return TS->format_number(String::num(p_time * 100 / graph_limit, 2)) + " " + TS->percent_sign();
|
||||
}
|
||||
|
@ -790,11 +790,11 @@ EditorVisualProfiler::EditorVisualProfiler() {
|
|||
variables->set_column_title(1, TTR("CPU"));
|
||||
variables->set_column_expand(1, false);
|
||||
variables->set_column_clip_content(1, true);
|
||||
variables->set_column_custom_minimum_width(1, 60 * EDSCALE);
|
||||
variables->set_column_custom_minimum_width(1, 75 * EDSCALE);
|
||||
variables->set_column_title(2, TTR("GPU"));
|
||||
variables->set_column_expand(2, false);
|
||||
variables->set_column_clip_content(2, true);
|
||||
variables->set_column_custom_minimum_width(2, 60 * EDSCALE);
|
||||
variables->set_column_custom_minimum_width(2, 75 * EDSCALE);
|
||||
variables->connect("cell_selected", callable_mp(this, &EditorVisualProfiler::_item_selected));
|
||||
|
||||
graph = memnew(TextureRect);
|
||||
|
|
Loading…
Reference in New Issue