From 8b5992f6658a125f63424a687e15e75ccd36906c Mon Sep 17 00:00:00 2001 From: Michael Alexsander Date: Tue, 7 Jan 2020 23:09:40 -0300 Subject: Make possible to edit the GraphEdit's selection rect colors --- scene/gui/graph_edit.cpp | 10 ++-------- scene/resources/default_theme/default_theme.cpp | 2 ++ 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'scene') diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp index d1650fea1e..be465751b6 100644 --- a/scene/gui/graph_edit.cpp +++ b/scene/gui/graph_edit.cpp @@ -777,14 +777,8 @@ void GraphEdit::_top_layer_draw() { } if (box_selecting) { - top_layer->draw_rect( - box_selecting_rect, - get_color("box_selection_fill_color", "Editor")); - - top_layer->draw_rect( - box_selecting_rect, - get_color("box_selection_stroke_color", "Editor"), - false); + top_layer->draw_rect(box_selecting_rect, get_color("selection_fill")); + top_layer->draw_rect(box_selecting_rect, get_color("selection_stroke"), false); } } diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp index 67351f07d2..cc76df62e5 100644 --- a/scene/resources/default_theme/default_theme.cpp +++ b/scene/resources/default_theme/default_theme.cpp @@ -851,6 +851,8 @@ void fill_default_theme(Ref &theme, const Ref &default_font, const theme->set_stylebox("bg", "GraphEdit", make_stylebox(tree_bg_png, 4, 4, 4, 5)); theme->set_color("grid_minor", "GraphEdit", Color(1, 1, 1, 0.05)); theme->set_color("grid_major", "GraphEdit", Color(1, 1, 1, 0.2)); + theme->set_color("selection_fill", "GraphEdit", Color(1, 1, 1, 0.3)); + theme->set_color("selection_stroke", "GraphEdit", Color(1, 1, 1, 0.8)); theme->set_color("activity", "GraphEdit", Color(1, 1, 1)); theme->set_constant("bezier_len_pos", "GraphEdit", 80 * scale); theme->set_constant("bezier_len_neg", "GraphEdit", 160 * scale); -- cgit v1.2.3