summaryrefslogtreecommitdiff
path: root/editor/debugger/editor_profiler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/debugger/editor_profiler.cpp')
-rw-r--r--editor/debugger/editor_profiler.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/editor/debugger/editor_profiler.cpp b/editor/debugger/editor_profiler.cpp
index 5f4d1b6f36..6b015e1fda 100644
--- a/editor/debugger/editor_profiler.cpp
+++ b/editor/debugger/editor_profiler.cpp
@@ -135,11 +135,11 @@ String EditorProfiler::_get_time_as_text(const Metric &m, float p_time, int p_ca
}
Color EditorProfiler::_get_color_from_signature(const StringName &p_signature) const {
- Color bc = get_theme_color("error_color", "Editor");
+ Color bc = get_theme_color(SNAME("error_color"), SNAME("Editor"));
double rot = ABS(double(p_signature.hash()) / double(0x7FFFFFFF));
Color c;
c.set_hsv(rot, bc.get_s(), bc.get_v());
- return c.lerp(get_theme_color("base_color", "Editor"), 0.07);
+ return c.lerp(get_theme_color(SNAME("base_color"), SNAME("Editor")), 0.07);
}
void EditorProfiler::_item_edited() {
@@ -180,7 +180,7 @@ void EditorProfiler::_update_plot() {
}
uint8_t *wr = graph_image.ptrw();
- const Color background_color = get_theme_color("dark_color_2", "Editor");
+ const Color background_color = get_theme_color(SNAME("dark_color_2"), SNAME("Editor"));
// Clear the previous frame and set the background color.
for (int i = 0; i < desired_len; i += 4) {
@@ -356,7 +356,7 @@ void EditorProfiler::_update_frame() {
item->set_metadata(1, it.script);
item->set_metadata(2, it.line);
item->set_text_align(2, TreeItem::ALIGN_RIGHT);
- item->set_tooltip(0, it.script + ":" + itos(it.line));
+ item->set_tooltip(0, it.name + "\n" + it.script + ":" + itos(it.line));
float time = dtime == DISPLAY_SELF_TIME ? it.self : it.total;
@@ -376,14 +376,14 @@ void EditorProfiler::_update_frame() {
void EditorProfiler::_activate_pressed() {
if (activate->is_pressed()) {
- activate->set_icon(get_theme_icon("Stop", "EditorIcons"));
+ activate->set_icon(get_theme_icon(SNAME("Stop"), SNAME("EditorIcons")));
activate->set_text(TTR("Stop"));
_clear_pressed();
} else {
- activate->set_icon(get_theme_icon("Play", "EditorIcons"));
+ activate->set_icon(get_theme_icon(SNAME("Play"), SNAME("EditorIcons")));
activate->set_text(TTR("Start"));
}
- emit_signal("enable_profiling", activate->is_pressed());
+ emit_signal(SNAME("enable_profiling"), activate->is_pressed());
}
void EditorProfiler::_clear_pressed() {
@@ -394,8 +394,8 @@ void EditorProfiler::_clear_pressed() {
void EditorProfiler::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_LAYOUT_DIRECTION_CHANGED || p_what == NOTIFICATION_TRANSLATION_CHANGED) {
- activate->set_icon(get_theme_icon("Play", "EditorIcons"));
- clear_button->set_icon(get_theme_icon("Clear", "EditorIcons"));
+ activate->set_icon(get_theme_icon(SNAME("Play"), SNAME("EditorIcons")));
+ clear_button->set_icon(get_theme_icon(SNAME("Clear"), SNAME("EditorIcons")));
}
}
@@ -462,7 +462,7 @@ void EditorProfiler::_graph_tex_input(const Ref<InputEvent> &p_ev) {
if (activate->is_pressed()) {
if (!seeking) {
- emit_signal("break_request");
+ emit_signal(SNAME("break_request"));
}
}