summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortoger5 <toger5@hotmail.de>2017-09-02 19:16:31 +0200
committertoger5 <toger5@hotmail.de>2017-09-04 18:57:52 +0200
commit07d5911c40408292b02878016d76edc79d615be2 (patch)
tree5f5339405f2678cf7c995ee6271679009245c68f
parent6d233c651b21ecaef78fbb20d0365a22919b72b1 (diff)
fixed copy on osx + help selection color
-rw-r--r--editor/editor_help.cpp16
-rw-r--r--scene/gui/rich_text_label.cpp2
2 files changed, 17 insertions, 1 deletions
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index c9d1548bfb..7fa2c53275 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -1711,6 +1711,11 @@ void EditorHelp::_notification(int p_what) {
_update_doc();
} break;
+ case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
+
+ class_desc->add_color_override("selection_color", EDITOR_DEF("text_editor/highlighting/selection_color", Color(0.2, 0.2, 1)));
+ } break;
+
default: break;
}
}
@@ -1785,6 +1790,7 @@ EditorHelp::EditorHelp() {
class_desc = memnew(RichTextLabel);
background_panel->add_child(class_desc);
class_desc->set_area_as_parent_rect();
+ class_desc->add_color_override("selection_color", EDITOR_DEF("text_editor/highlighting/selection_color", Color(0.2, 0.2, 1)));
class_desc->connect("meta_clicked", this, "_class_desc_select");
class_desc->connect("gui_input", this, "_class_desc_input");
}
@@ -1872,6 +1878,15 @@ void EditorHelpBit::_bind_methods() {
}
void EditorHelpBit::_notification(int p_what) {
+
+ switch (p_what) {
+ case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
+
+ rich_text->add_color_override("selection_color", EDITOR_DEF("text_editor/highlighting/selection_color", Color(0.2, 0.2, 1)));
+ } break;
+
+ default: break;
+ }
}
void EditorHelpBit::set_text(const String &p_text) {
@@ -1886,5 +1901,6 @@ EditorHelpBit::EditorHelpBit() {
add_child(rich_text);
rich_text->set_area_as_parent_rect();
rich_text->connect("meta_clicked", this, "_meta_clicked");
+ rich_text->add_color_override("selection_color", EDITOR_DEF("text_editor/highlighting/selection_color", Color(0.2, 0.2, 1)));
set_custom_minimum_size(Size2(0, 70 * EDSCALE));
}
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index e51955ed66..ab2c2f445f 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -799,7 +799,7 @@ void RichTextLabel::_gui_input(Ref<InputEvent> p_event) {
Ref<InputEventKey> k = p_event;
if (k.is_valid()) {
- if (k->is_pressed() && !k->get_alt() && !k->get_shift() && !k->get_metakey()) {
+ if (k->is_pressed() && !k->get_alt() && !k->get_shift()) {
bool handled = true;
switch (k->get_scancode()) {
case KEY_PAGEUP: {