summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-01-04 14:50:15 +0100
committerGitHub <noreply@github.com>2018-01-04 14:50:15 +0100
commitdc2cc6bc2b2c5ca770675267bff98f434566866b (patch)
tree1cd55722e7b148e3f44616f011dee1b1d72e4283 /editor
parentda4edf83d3911aae7128e71a0560d275f9631525 (diff)
parentbd0a9f4bd607a324eb2220502a506abad5f33c10 (diff)
Merge pull request #15186 from GodotExplorer/default-theme
Fix errors with custom theme and custom font in project settings.
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_log.cpp4
-rw-r--r--editor/editor_themes.cpp3
2 files changed, 6 insertions, 1 deletions
diff --git a/editor/editor_log.cpp b/editor/editor_log.cpp
index 1b885adf37..79542f3b5c 100644
--- a/editor/editor_log.cpp
+++ b/editor/editor_log.cpp
@@ -66,7 +66,9 @@ void EditorLog::_notification(int p_what) {
Ref<DynamicFont> df_output_code = get_font("output_source", "EditorFonts");
if (df_output_code.is_valid()) {
df_output_code->set_size(int(EDITOR_DEF("run/output/font_size", 13)) * EDSCALE);
- log->add_font_override("normal_font", get_font("output_source", "EditorFonts"));
+ if (log != NULL) {
+ log->add_font_override("normal_font", get_font("output_source", "EditorFonts"));
+ }
}
}
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index b19d015455..8a3e7e6716 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -332,6 +332,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
const Color font_color = mono_color.linear_interpolate(base_color, 0.25);
const Color font_color_hl = mono_color.linear_interpolate(base_color, 0.15);
const Color font_color_disabled = Color(mono_color.r, mono_color.g, mono_color.b, 0.3);
+ const Color font_color_selection = Color::html("#7d7d7d");
const Color color_disabled = mono_color.inverted().linear_interpolate(base_color, 0.7);
const Color color_disabled_bg = mono_color.inverted().linear_interpolate(base_color, 0.9);
@@ -790,6 +791,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_color("read_only", "LineEdit", font_color_disabled);
theme->set_color("font_color", "LineEdit", font_color);
theme->set_color("cursor_color", "LineEdit", font_color);
+ theme->set_color("selection_color", "LineEdit", font_color_selection);
// TextEdit
theme->set_stylebox("normal", "TextEdit", style_widget);
@@ -799,6 +801,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_icon("tab", "TextEdit", theme->get_icon("GuiTab", "EditorIcons"));
theme->set_color("font_color", "TextEdit", font_color);
theme->set_color("caret_color", "TextEdit", highlight_color);
+ theme->set_color("selection_color", "TextEdit", font_color_selection);
// H/VSplitContainer
theme->set_stylebox("bg", "VSplitContainer", make_stylebox(theme->get_icon("GuiVsplitBg", "EditorIcons"), 1, 1, 1, 1));