summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-06-04 09:27:39 +0200
committerGitHub <noreply@github.com>2019-06-04 09:27:39 +0200
commit2844b76feb842149d5ab09f0155c5f439378e596 (patch)
tree3e1b04729ece1dd069e6dd26a271d8d2b7215a54 /editor
parente13d470034d6d0a83335397df2d010bf51cabbcd (diff)
parentb615277a072de9e863778ba0ea06267731e5ffd5 (diff)
Merge pull request #29448 from Calinou/improve-performance-monitor-display
Improve the performance monitor display
Diffstat (limited to 'editor')
-rw-r--r--editor/script_editor_debugger.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp
index 621ab039f4..c3b62810f1 100644
--- a/editor/script_editor_debugger.cpp
+++ b/editor/script_editor_debugger.cpp
@@ -1025,7 +1025,9 @@ void ScriptEditorDebugger::_performance_draw() {
int pi = which[i];
Color c = get_color("accent_color", "Editor");
float h = (float)which[i] / (float)(perf_items.size());
- c.set_hsv(Math::fmod(h + 0.4, 0.9), c.get_s() * 0.9, c.get_v() * 1.4);
+ // Use a darker color on light backgrounds for better visibility
+ float value_multiplier = EditorSettings::get_singleton()->is_dark_theme() ? 1.4 : 0.55;
+ c.set_hsv(Math::fmod(h + 0.4, 0.9), c.get_s() * 0.9, c.get_v() * value_multiplier);
c.a = 0.6;
perf_draw->draw_string(graph_font, r.position + Point2(0, graph_font->get_ascent()), perf_items[pi]->get_text(0), c, r.size.x);
@@ -1045,9 +1047,8 @@ void ScriptEditorDebugger::_performance_draw() {
float h2 = E->get()[pi] / m;
h2 = (1.0 - h2) * r.size.y;
- c.a = 0.7;
if (E != perf_history.front())
- perf_draw->draw_line(r.position + Point2(from, h2), r.position + Point2(from + spacing, prev), c, 2.0);
+ perf_draw->draw_line(r.position + Point2(from, h2), r.position + Point2(from + spacing, prev), c, Math::round(EDSCALE), true);
prev = h2;
E = E->next();
from -= spacing;