From a0b409cb14df984e1926e4039b0d03bb221b73ba Mon Sep 17 00:00:00 2001 From: Paulb23 Date: Fri, 24 Jul 2020 15:50:35 +0100 Subject: Add and convert editor to use CodeEdit --- editor/editor_themes.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'editor/editor_themes.cpp') diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 8d54bc8021..54f64b7e45 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -874,6 +874,19 @@ Ref create_editor_theme(const Ref p_theme) { theme->set_color("caret_color", "TextEdit", font_color); theme->set_color("selection_color", "TextEdit", font_color_selection); + // CodeEdit + theme->set_stylebox("normal", "CodeEdit", style_widget); + theme->set_stylebox("focus", "CodeEdit", style_widget_hover); + theme->set_stylebox("read_only", "CodeEdit", style_widget_disabled); + theme->set_constant("side_margin", "TabContainer", 0); + theme->set_icon("tab", "CodeEdit", theme->get_icon("GuiTab", "EditorIcons")); + theme->set_icon("space", "CodeEdit", theme->get_icon("GuiSpace", "EditorIcons")); + theme->set_icon("folded", "CodeEdit", theme->get_icon("GuiTreeArrowRight", "EditorIcons")); + theme->set_icon("fold", "CodeEdit", theme->get_icon("GuiTreeArrowDown", "EditorIcons")); + theme->set_color("font_color", "CodeEdit", font_color); + theme->set_color("caret_color", "CodeEdit", font_color); + theme->set_color("selection_color", "CodeEdit", font_color_selection); + // H/VSplitContainer theme->set_stylebox("bg", "VSplitContainer", make_stylebox(theme->get_icon("GuiVsplitBg", "EditorIcons"), 1, 1, 1, 1)); theme->set_stylebox("bg", "HSplitContainer", make_stylebox(theme->get_icon("GuiHsplitBg", "EditorIcons"), 1, 1, 1, 1)); -- cgit v1.2.3 From 4d7df24d46f931839247a9886c485ed244d1c8ee Mon Sep 17 00:00:00 2001 From: Paulb23 Date: Sun, 26 Jul 2020 15:57:23 +0100 Subject: Add main_gutter (breakpoints, bookmarks, execution lines) to code_edit --- editor/editor_themes.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'editor/editor_themes.cpp') diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 54f64b7e45..9e78ca3581 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -883,6 +883,7 @@ Ref create_editor_theme(const Ref p_theme) { theme->set_icon("space", "CodeEdit", theme->get_icon("GuiSpace", "EditorIcons")); theme->set_icon("folded", "CodeEdit", theme->get_icon("GuiTreeArrowRight", "EditorIcons")); theme->set_icon("fold", "CodeEdit", theme->get_icon("GuiTreeArrowDown", "EditorIcons")); + theme->set_icon("executing_line", "CodeEdit", theme->get_icon("MainPlay", "EditorIcons")); theme->set_color("font_color", "CodeEdit", font_color); theme->set_color("caret_color", "CodeEdit", font_color); theme->set_color("selection_color", "CodeEdit", font_color_selection); @@ -1192,7 +1193,7 @@ Ref create_editor_theme(const Ref p_theme) { const Color mark_color = Color(error_color.r, error_color.g, error_color.b, 0.3); const Color bookmark_color = Color(0.08, 0.49, 0.98); const Color breakpoint_color = error_color; - const Color executing_line_color = Color(0.2, 0.8, 0.2, 0.4); + const Color executing_line_color = Color(0.98, 0.89, 0.27); const Color code_folding_color = alpha3; const Color search_result_color = alpha1; const Color search_result_border_color = Color(0.41, 0.61, 0.91, 0.38); -- cgit v1.2.3 From 7829fdc1d0d4e78e24aa902219f54b0edfb6cd3c Mon Sep 17 00:00:00 2001 From: Paulb23 Date: Mon, 27 Jul 2020 13:54:12 +0100 Subject: Add folding gutter to code_edit --- editor/editor_themes.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'editor/editor_themes.cpp') diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 9e78ca3581..11b0228fd5 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -868,8 +868,6 @@ Ref create_editor_theme(const Ref p_theme) { theme->set_constant("side_margin", "TabContainer", 0); theme->set_icon("tab", "TextEdit", theme->get_icon("GuiTab", "EditorIcons")); theme->set_icon("space", "TextEdit", theme->get_icon("GuiSpace", "EditorIcons")); - theme->set_icon("folded", "TextEdit", theme->get_icon("GuiTreeArrowRight", "EditorIcons")); - theme->set_icon("fold", "TextEdit", theme->get_icon("GuiTreeArrowDown", "EditorIcons")); theme->set_color("font_color", "TextEdit", font_color); theme->set_color("caret_color", "TextEdit", font_color); theme->set_color("selection_color", "TextEdit", font_color_selection); @@ -882,7 +880,7 @@ Ref create_editor_theme(const Ref p_theme) { theme->set_icon("tab", "CodeEdit", theme->get_icon("GuiTab", "EditorIcons")); theme->set_icon("space", "CodeEdit", theme->get_icon("GuiSpace", "EditorIcons")); theme->set_icon("folded", "CodeEdit", theme->get_icon("GuiTreeArrowRight", "EditorIcons")); - theme->set_icon("fold", "CodeEdit", theme->get_icon("GuiTreeArrowDown", "EditorIcons")); + theme->set_icon("can_fold", "CodeEdit", theme->get_icon("GuiTreeArrowDown", "EditorIcons")); theme->set_icon("executing_line", "CodeEdit", theme->get_icon("MainPlay", "EditorIcons")); theme->set_color("font_color", "CodeEdit", font_color); theme->set_color("caret_color", "CodeEdit", font_color); -- cgit v1.2.3