summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorMichael Alexsander <michaelalexsander@protonmail.com>2020-01-07 23:09:40 -0300
committerMichael Alexsander <michaelalexsander@protonmail.com>2020-01-07 23:20:48 -0300
commit8b5992f6658a125f63424a687e15e75ccd36906c (patch)
tree46b53171ded1cf2103bcbd3425146b3593b6b4da /scene
parent83fe471c3b3e62773438256a4ab01b83cf292c52 (diff)
Make possible to edit the GraphEdit's selection rect colors
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/graph_edit.cpp10
-rw-r--r--scene/resources/default_theme/default_theme.cpp2
2 files changed, 4 insertions, 8 deletions
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> &theme, const Ref<Font> &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);