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 2f3ad210b2..1577e24ac0 100644
--- a/editor/debugger/editor_profiler.cpp
+++ b/editor/debugger/editor_profiler.cpp
@@ -132,11 +132,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_color("error_color", "Editor");
+ Color bc = get_theme_color("error_color", "Editor");
double rot = ABS(double(p_signature.hash()) / double(0x7FFFFFFF));
Color c;
c.set_hsv(rot, bc.get_s(), bc.get_v());
- return c.linear_interpolate(get_color("base_color", "Editor"), 0.07);
+ return c.linear_interpolate(get_theme_color("base_color", "Editor"), 0.07);
}
void EditorProfiler::_item_edited() {
@@ -176,7 +176,7 @@ void EditorProfiler::_update_plot() {
}
uint8_t *wr = graph_image.ptrw();
- const Color background_color = get_color("dark_color_2", "Editor");
+ const Color background_color = get_theme_color("dark_color_2", "Editor");
// Clear the previous frame and set the background color.
for (int i = 0; i < desired_len; i += 4) {
@@ -420,10 +420,10 @@ void EditorProfiler::_update_frame() {
void EditorProfiler::_activate_pressed() {
if (activate->is_pressed()) {
- activate->set_icon(get_icon("Stop", "EditorIcons"));
+ activate->set_icon(get_theme_icon("Stop", "EditorIcons"));
activate->set_text(TTR("Stop"));
} else {
- activate->set_icon(get_icon("Play", "EditorIcons"));
+ activate->set_icon(get_theme_icon("Play", "EditorIcons"));
activate->set_text(TTR("Start"));
}
emit_signal("enable_profiling", activate->is_pressed());
@@ -438,8 +438,8 @@ void EditorProfiler::_clear_pressed() {
void EditorProfiler::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
- activate->set_icon(get_icon("Play", "EditorIcons"));
- clear_button->set_icon(get_icon("Clear", "EditorIcons"));
+ activate->set_icon(get_theme_icon("Play", "EditorIcons"));
+ clear_button->set_icon(get_theme_icon("Clear", "EditorIcons"));
}
}
@@ -611,8 +611,8 @@ bool EditorProfiler::is_profiling() {
return activate->is_pressed();
}
-Vector<Vector<String> > EditorProfiler::get_data_as_csv() const {
- Vector<Vector<String> > res;
+Vector<Vector<String>> EditorProfiler::get_data_as_csv() const {
+ Vector<Vector<String>> res;
if (frame_metrics.empty()) {
return res;
@@ -712,7 +712,7 @@ EditorProfiler::EditorProfiler() {
hb->add_child(cursor_metric_edit);
cursor_metric_edit->connect("value_changed", callable_mp(this, &EditorProfiler::_cursor_metric_changed));
- hb->add_constant_override("separation", 8 * EDSCALE);
+ hb->add_theme_constant_override("separation", 8 * EDSCALE);
h_split = memnew(HSplitContainer);
add_child(h_split);