summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-06-12 23:44:24 +0200
committerGitHub <noreply@github.com>2019-06-12 23:44:24 +0200
commita7459347615749875d899da308ae33097347b789 (patch)
treebfcc856226c8ddc265b263af7d05300428db8470 /scene/gui
parentbbbc04b2fe83be1cd73d278f76471b1940db68e2 (diff)
parent84d969a42aadadf5e727cb1de34d547276f506bd (diff)
Merge pull request #29731 from akien-mga/scene-is-off-limits
Cleanup some unecessary editor/ includes in scene/
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/control.cpp10
-rw-r--r--scene/gui/gradient_edit.cpp9
-rw-r--r--scene/gui/gradient_edit.h2
-rw-r--r--scene/gui/tree.cpp2
4 files changed, 14 insertions, 9 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index 76275c2420..9d7c08d3f3 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -29,23 +29,23 @@
/*************************************************************************/
#include "control.h"
-#include "core/project_settings.h"
-#include "scene/main/canvas_layer.h"
-#include "scene/main/viewport.h"
-#include "servers/visual_server.h"
#include "core/message_queue.h"
#include "core/os/keyboard.h"
#include "core/os/os.h"
#include "core/print_string.h"
+#include "core/project_settings.h"
#include "scene/gui/label.h"
#include "scene/gui/panel.h"
+#include "scene/main/canvas_layer.h"
+#include "scene/main/viewport.h"
#include "scene/scene_string_names.h"
+#include "servers/visual_server.h"
+
#ifdef TOOLS_ENABLED
#include "editor/editor_settings.h"
#include "editor/plugins/canvas_item_editor_plugin.h"
#endif
-#include <stdio.h>
Dictionary Control::_edit_get_state() const {
diff --git a/scene/gui/gradient_edit.cpp b/scene/gui/gradient_edit.cpp
index cfbc9d6d18..75f5f79873 100644
--- a/scene/gui/gradient_edit.cpp
+++ b/scene/gui/gradient_edit.cpp
@@ -29,10 +29,17 @@
/*************************************************************************/
#include "gradient_edit.h"
+
#include "core/os/keyboard.h"
-#include "editor/editor_scale.h"
+#ifdef TOOLS_ENABLED
+#include "editor/editor_scale.h"
#define SPACING (3 * EDSCALE)
+#define POINT_WIDTH (8 * EDSCALE)
+#else
+#define SPACING 3
+#define POINT_WIDTH 8
+#endif
GradientEdit::GradientEdit() {
grabbed = -1;
diff --git a/scene/gui/gradient_edit.h b/scene/gui/gradient_edit.h
index 662278a17b..6f31107729 100644
--- a/scene/gui/gradient_edit.h
+++ b/scene/gui/gradient_edit.h
@@ -36,8 +36,6 @@
#include "scene/resources/default_theme/theme_data.h"
#include "scene/resources/gradient.h"
-#define POINT_WIDTH (8 * EDSCALE)
-
class GradientEdit : public Control {
GDCLASS(GradientEdit, Control);
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index 451241af40..522c1ecb6a 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -39,7 +39,7 @@
#include "scene/main/viewport.h"
#ifdef TOOLS_ENABLED
-#include "editor/editor_node.h"
+#include "editor/editor_scale.h"
#endif
#include <limits.h>