|
@@ -92,6 +92,7 @@ static Ref<Texture2D> flip_icon(Ref<Texture2D> p_texture, bool p_flip_y = false,
|
|
|
|
|
|
Ref<ImageTexture> texture(memnew(ImageTexture));
|
|
|
Ref<Image> img = p_texture->get_data();
|
|
|
+ img = img->duplicate();
|
|
|
|
|
|
if (p_flip_y) {
|
|
|
img->flip_y();
|
|
@@ -1098,7 +1099,11 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
|
|
|
theme->set_constant("bezier_len_neg", "GraphEdit", 160 * EDSCALE);
|
|
|
|
|
|
// GraphEditMinimap
|
|
|
- theme->set_stylebox("bg", "GraphEditMinimap", make_flat_stylebox(dark_color_1, 0, 0, 0, 0));
|
|
|
+ Ref<StyleBoxFlat> style_minimap_bg = make_flat_stylebox(dark_color_1, 0, 0, 0, 0);
|
|
|
+ style_minimap_bg->set_border_color(dark_color_3);
|
|
|
+ style_minimap_bg->set_border_width_all(1);
|
|
|
+ theme->set_stylebox("bg", "GraphEditMinimap", style_minimap_bg);
|
|
|
+
|
|
|
Ref<StyleBoxFlat> style_minimap_camera;
|
|
|
Ref<StyleBoxFlat> style_minimap_node;
|
|
|
if (dark_theme) {
|
|
@@ -1115,9 +1120,15 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
|
|
|
theme->set_stylebox("camera", "GraphEditMinimap", style_minimap_camera);
|
|
|
theme->set_stylebox("node", "GraphEditMinimap", style_minimap_node);
|
|
|
|
|
|
- Ref<Texture2D> resizer_icon = theme->get_icon("GuiResizer", "EditorIcons");
|
|
|
- theme->set_icon("resizer", "GraphEditMinimap", flip_icon(resizer_icon, true, true));
|
|
|
- theme->set_color("resizer_color", "GraphEditMinimap", Color(1, 1, 1, 0.65));
|
|
|
+ Ref<Texture2D> minimap_resizer_icon = theme->get_icon("GuiResizer", "EditorIcons");
|
|
|
+ Color minimap_resizer_color;
|
|
|
+ if (dark_theme) {
|
|
|
+ minimap_resizer_color = Color(1, 1, 1, 0.65);
|
|
|
+ } else {
|
|
|
+ minimap_resizer_color = Color(0, 0, 0, 0.65);
|
|
|
+ }
|
|
|
+ theme->set_icon("resizer", "GraphEditMinimap", flip_icon(minimap_resizer_icon, true, true));
|
|
|
+ theme->set_color("resizer_color", "GraphEditMinimap", minimap_resizer_color);
|
|
|
|
|
|
// GraphNode
|
|
|
const float mv = dark_theme ? 0.0 : 1.0;
|