summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/classes/GraphEdit.xml4
-rw-r--r--editor/editor_themes.cpp2
-rw-r--r--scene/gui/graph_edit.cpp10
-rw-r--r--scene/resources/default_theme/default_theme.cpp2
4 files changed, 10 insertions, 8 deletions
diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml
index 3041a7cb7f..d8732f4f49 100644
--- a/doc/classes/GraphEdit.xml
+++ b/doc/classes/GraphEdit.xml
@@ -316,6 +316,10 @@
</theme_item>
<theme_item name="reset" type="Texture">
</theme_item>
+ <theme_item name="selection_fill" type="Color" default="Color( 1, 1, 1, 0.3 )">
+ </theme_item>
+ <theme_item name="selection_stroke" type="Color" default="Color( 1, 1, 1, 0.8 )">
+ </theme_item>
<theme_item name="snap" type="Texture">
</theme_item>
</theme_items>
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index 15fb6a9521..2cacc767c8 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -1012,6 +1012,8 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_color("grid_major", "GraphEdit", Color(0.0, 0.0, 0.0, 0.15));
theme->set_color("grid_minor", "GraphEdit", Color(0.0, 0.0, 0.0, 0.07));
}
+ theme->set_color("selection_fill", "GraphEdit", theme->get_color("box_selection_fill_color", "Editor"));
+ theme->set_color("selection_stroke", "GraphEdit", theme->get_color("box_selection_stroke_color", "Editor"));
theme->set_color("activity", "GraphEdit", accent_color);
theme->set_icon("minus", "GraphEdit", theme->get_icon("ZoomLess", "EditorIcons"));
theme->set_icon("more", "GraphEdit", theme->get_icon("ZoomMore", "EditorIcons"));
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);