summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-08-20 09:17:41 +0200
committerGitHub <noreply@github.com>2018-08-20 09:17:41 +0200
commit15433cffe783066c473266faf89bce37c6e6c37d (patch)
tree70e6527e97649fe6e7a4c1df8d6900f53e6aa100
parentc962f03d3705eb31d378df685456cf75f7ed4742 (diff)
parent5ba083ea1bf6517fc54d7306ba1cb0178ec830d7 (diff)
Merge pull request #21195 from AlexHolly/search-help-selection-color
changed search help selection color
-rw-r--r--editor/editor_help.cpp8
-rw-r--r--editor/editor_settings.cpp1
2 files changed, 5 insertions, 4 deletions
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index 60826aa81b..65c41ef579 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -1781,7 +1781,7 @@ void EditorHelp::_notification(int p_what) {
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
- class_desc->add_color_override("selection_color", get_color("text_editor/theme/selection_color", "Editor"));
+ class_desc->add_color_override("selection_color", EditorSettings::get_singleton()->get("text_editor/theme/selection_color"));
_update_doc();
} break;
@@ -1863,7 +1863,7 @@ EditorHelp::EditorHelp() {
class_desc = memnew(RichTextLabel);
add_child(class_desc);
class_desc->set_v_size_flags(SIZE_EXPAND_FILL);
- class_desc->add_color_override("selection_color", get_color("text_editor/theme/selection_color", "Editor"));
+ class_desc->add_color_override("selection_color", EditorSettings::get_singleton()->get("text_editor/theme/selection_color"));
class_desc->connect("meta_clicked", this, "_class_desc_select");
class_desc->connect("gui_input", this, "_class_desc_input");
@@ -1929,7 +1929,7 @@ void EditorHelpBit::_notification(int p_what) {
switch (p_what) {
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
- rich_text->add_color_override("selection_color", get_color("text_editor/theme/selection_color", "Editor"));
+ rich_text->add_color_override("selection_color", EditorSettings::get_singleton()->get("text_editor/theme/selection_color"));
} break;
default: break;
@@ -1948,7 +1948,7 @@ EditorHelpBit::EditorHelpBit() {
add_child(rich_text);
//rich_text->set_anchors_and_margins_preset(Control::PRESET_WIDE);
rich_text->connect("meta_clicked", this, "_meta_clicked");
- rich_text->add_color_override("selection_color", get_color("text_editor/theme/selection_color", "Editor"));
+ rich_text->add_color_override("selection_color", EditorSettings::get_singleton()->get("text_editor/theme/selection_color"));
rich_text->set_override_selected_font_color(false);
set_custom_minimum_size(Size2(0, 70 * EDSCALE));
}
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index d673cc1b29..85186440ab 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -357,6 +357,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
hints["text_editor/theme/color_theme"] = PropertyInfo(Variant::STRING, "text_editor/theme/color_theme", PROPERTY_HINT_ENUM, "Adaptive,Default,Custom");
_initial_set("text_editor/theme/line_spacing", 4);
+ _initial_set("text_editor/theme/selection_color", Color::html("40808080"));
_load_default_text_editor_theme();