summaryrefslogtreecommitdiffstats
path: root/editor/debugger/editor_visual_profiler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/debugger/editor_visual_profiler.cpp')
-rw-r--r--editor/debugger/editor_visual_profiler.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/editor/debugger/editor_visual_profiler.cpp b/editor/debugger/editor_visual_profiler.cpp
index 7b831a1c8b..9a83277e99 100644
--- a/editor/debugger/editor_visual_profiler.cpp
+++ b/editor/debugger/editor_visual_profiler.cpp
@@ -30,6 +30,7 @@
#include "editor_visual_profiler.h"
+#include "core/io/image.h"
#include "core/os/os.h"
#include "editor/editor_settings.h"
#include "editor/editor_string_names.h"
@@ -410,12 +411,12 @@ void EditorVisualProfiler::_update_frame(bool p_focus_selected) {
void EditorVisualProfiler::_activate_pressed() {
if (activate->is_pressed()) {
- activate->set_icon(get_editor_theme_icon(SNAME("Stop")));
+ activate->set_button_icon(get_editor_theme_icon(SNAME("Stop")));
activate->set_text(TTR("Stop"));
_clear_pressed(); //always clear on start
clear_button->set_disabled(false);
} else {
- activate->set_icon(get_editor_theme_icon(SNAME("Play")));
+ activate->set_button_icon(get_editor_theme_icon(SNAME("Play")));
activate->set_text(TTR("Start"));
}
emit_signal(SNAME("enable_profiling"), activate->is_pressed());
@@ -437,8 +438,8 @@ void EditorVisualProfiler::_notification(int p_what) {
case NOTIFICATION_LAYOUT_DIRECTION_CHANGED:
case NOTIFICATION_THEME_CHANGED:
case NOTIFICATION_TRANSLATION_CHANGED: {
- activate->set_icon(get_editor_theme_icon(SNAME("Play")));
- clear_button->set_icon(get_editor_theme_icon(SNAME("Clear")));
+ activate->set_button_icon(get_editor_theme_icon(SNAME("Play")));
+ clear_button->set_button_icon(get_editor_theme_icon(SNAME("Clear")));
} break;
}
}
@@ -656,10 +657,10 @@ void EditorVisualProfiler::_bind_methods() {
void EditorVisualProfiler::_update_button_text() {
if (activate->is_pressed()) {
- activate->set_icon(get_editor_theme_icon(SNAME("Stop")));
+ activate->set_button_icon(get_editor_theme_icon(SNAME("Stop")));
activate->set_text(TTR("Stop"));
} else {
- activate->set_icon(get_editor_theme_icon(SNAME("Play")));
+ activate->set_button_icon(get_editor_theme_icon(SNAME("Play")));
activate->set_text(TTR("Start"));
}
}