summaryrefslogtreecommitdiffstats
path: root/scene/resources/default_theme
diff options
context:
space:
mode:
authorHendrik Brucker <hendrik.brucker@mail.de>2023-07-10 17:26:02 +0200
committerYuri Sizov <yuris@humnom.net>2023-07-24 18:37:23 +0200
commita38fd09669a733220804c50e9794fb7baa3e3bfa (patch)
treedb21bee5cbc6007bc4fc63699f93b9dbbe333b56 /scene/resources/default_theme
parent91258e52be59d1c1c93b0b798f2401dbbb15a1d0 (diff)
downloadredot-engine-a38fd09669a733220804c50e9794fb7baa3e3bfa.tar.gz
Clean up/refactor GraphEdit
Diffstat (limited to 'scene/resources/default_theme')
-rw-r--r--scene/resources/default_theme/default_theme.cpp17
-rw-r--r--scene/resources/default_theme/grid_toggle.svg1
2 files changed, 11 insertions, 7 deletions
diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp
index 054bf58be7..b6a1737acb 100644
--- a/scene/resources/default_theme/default_theme.cpp
+++ b/scene/resources/default_theme/default_theme.cpp
@@ -1110,13 +1110,16 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_stylebox("panel", "PanelContainer", make_flat_stylebox(style_normal_color, 0, 0, 0, 0));
- theme->set_icon("minus", "GraphEdit", icons["zoom_less"]);
- theme->set_icon("reset", "GraphEdit", icons["zoom_reset"]);
- theme->set_icon("more", "GraphEdit", icons["zoom_more"]);
- theme->set_icon("snap", "GraphEdit", icons["grid_snap"]);
- theme->set_icon("minimap", "GraphEdit", icons["grid_minimap"]);
+ theme->set_icon("zoom_out", "GraphEdit", icons["zoom_less"]);
+ theme->set_icon("zoom_in", "GraphEdit", icons["zoom_more"]);
+ theme->set_icon("zoom_reset", "GraphEdit", icons["zoom_reset"]);
+ theme->set_icon("grid_toggle", "GraphEdit", icons["grid_toggle"]);
+ theme->set_icon("minimap_toggle", "GraphEdit", icons["grid_minimap"]);
+ theme->set_icon("snapping_toggle", "GraphEdit", icons["grid_snap"]);
theme->set_icon("layout", "GraphEdit", icons["grid_layout"]);
- theme->set_stylebox("bg", "GraphEdit", make_flat_stylebox(style_normal_color, 4, 4, 4, 5));
+
+ theme->set_stylebox("panel", "GraphEdit", make_flat_stylebox(style_normal_color, 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));
@@ -1128,7 +1131,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_constant("port_hotzone_inner_extent", "GraphEdit", 22 * scale);
theme->set_constant("port_hotzone_outer_extent", "GraphEdit", 26 * scale);
- theme->set_stylebox("bg", "GraphEditMinimap", make_flat_stylebox(Color(0.24, 0.24, 0.24), 0, 0, 0, 0));
+ theme->set_stylebox("panel", "GraphEditMinimap", make_flat_stylebox(Color(0.24, 0.24, 0.24), 0, 0, 0, 0));
Ref<StyleBoxFlat> style_minimap_camera = make_flat_stylebox(Color(0.65, 0.65, 0.65, 0.2), 0, 0, 0, 0, 0);
style_minimap_camera->set_border_color(Color(0.65, 0.65, 0.65, 0.45));
style_minimap_camera->set_border_width_all(1);
diff --git a/scene/resources/default_theme/grid_toggle.svg b/scene/resources/default_theme/grid_toggle.svg
new file mode 100644
index 0000000000..b0721db518
--- /dev/null
+++ b/scene/resources/default_theme/grid_toggle.svg
@@ -0,0 +1 @@
+<svg viewBox="0 0 16 16" height="16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M3 0v3H0v2h3v4H0v2h3v3h2V5h9V3h-3V0H9v3H5V0z" fill="#b2b2b2" fill-opacity=".65"/><path d="M11 6.62c-1.747 0-3.957 1.344-4.752 3.936a.683.69 0 00-.004.394C7.012 13.665 9.292 14.9 11 14.9c1.708 0 3.988-1.235 4.756-3.95a.683.69 0 000-.382C15.004 7.955 12.746 6.62 11 6.62zM11 8a2.733 2.76 0 012.733 2.76A2.733 2.76 0 0111 13.52a2.733 2.76 0 01-2.733-2.76A2.733 2.76 0 0111 8zm0 1.38a1.367 1.38 0 00-1.367 1.38A1.367 1.38 0 0011 12.14a1.367 1.38 0 001.367-1.38A1.367 1.38 0 0011 9.38z" fill="#e0e0e0" /></svg>