summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-09-12 13:39:51 +0200
committerGitHub <noreply@github.com>2017-09-12 13:39:51 +0200
commit5f8f8e4922765f729f3176ea0ae8eb807a0281d5 (patch)
treec77e3d3f5a6b7d125fae824c5e7515e0d2935468
parent0e8f44016e3aea614a35b531887ad2df2e36df0d (diff)
parent41cc85fb201f2b83461a52300aeca9a2ac0b2bcc (diff)
Merge pull request #11025 from volzhs/script-editor
Fit script editor grid with others
-rw-r--r--editor/editor_themes.cpp4
-rw-r--r--editor/plugins/script_editor_plugin.cpp3
2 files changed, 7 insertions, 0 deletions
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index 19356aad3a..ff0e794a20 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -295,6 +295,10 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_stylebox("panel", "PanelContainer", style_menu);
theme->set_stylebox("MenuPanel", "EditorStyles", style_menu);
+ // Script Editor
+ theme->set_stylebox("ScriptEditorPanel", "EditorStyles", make_empty_stylebox(4, 0, 4, 4));
+ theme->set_stylebox("ScriptEditor", "EditorStyles", make_empty_stylebox(0, 0, 0, 0));
+
// Play button group
theme->set_stylebox("PlayButtonPanel", "EditorStyles", make_empty_stylebox(8, 4, 8, 4)); //make_stylebox(theme->get_icon("GuiPlayButtonGroup", "EditorIcons"), 16, 16, 16, 16, 8, 4, 8, 4));
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 04be1ba4ab..6f03d086ca 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -2416,6 +2416,9 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
use_space_indentation = false;
ScriptServer::edit_request_func = _open_script_request;
+
+ add_style_override("panel", editor->get_gui_base()->get_stylebox("ScriptEditorPanel", "EditorStyles"));
+ tab_container->add_style_override("panel", editor->get_gui_base()->get_stylebox("ScriptEditor", "EditorStyles"));
}
ScriptEditor::~ScriptEditor() {