diff options
Diffstat (limited to 'editor/editor_help.cpp')
-rw-r--r-- | editor/editor_help.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index 7d88b94a37..75dbe74e01 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -477,9 +477,9 @@ void EditorHelp::_update_method_descriptions(const DocData::ClassDoc p_classdoc, class_desc->add_text(" "); class_desc->push_color(comment_color); if (p_classdoc.is_script_doc) { - class_desc->append_text(TTR("There is currently no description for this " + p_method_type + ".")); + class_desc->append_text(vformat(TTR("There is currently no description for this %s."), p_method_type)); } else { - class_desc->append_text(TTR("There is currently no description for this " + p_method_type + ". Please help us by [color=$color][url=$url]contributing one[/url][/color]!").replace("$url", CONTRIBUTE_URL).replace("$color", link_color_text)); + class_desc->append_text(vformat(TTR("There is currently no description for this %s. Please help us by [color=$color][url=$url]contributing one[/url][/color]!"), p_method_type).replace("$url", CONTRIBUTE_URL).replace("$color", link_color_text)); } class_desc->pop(); } @@ -1476,10 +1476,10 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) { Ref<Font> doc_font = p_rt->get_theme_font(SNAME("doc"), SNAME("EditorFonts")); Ref<Font> doc_bold_font = p_rt->get_theme_font(SNAME("doc_bold"), SNAME("EditorFonts")); + Ref<Font> doc_italic_font = p_rt->get_theme_font(SNAME("doc_italic"), SNAME("EditorFonts")); Ref<Font> doc_code_font = p_rt->get_theme_font(SNAME("doc_source"), SNAME("EditorFonts")); Ref<Font> doc_kbd_font = p_rt->get_theme_font(SNAME("doc_keyboard"), SNAME("EditorFonts")); - Color headline_color = p_rt->get_theme_color(SNAME("headline_color"), SNAME("EditorHelp")); Color link_color = p_rt->get_theme_color(SNAME("link_color"), SNAME("EditorHelp")); Color code_color = p_rt->get_theme_color(SNAME("code_color"), SNAME("EditorHelp")); Color kbd_color = p_rt->get_theme_color(SNAME("kbd_color"), SNAME("EditorHelp")); @@ -1633,7 +1633,7 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) { tag_stack.push_front(tag); } else if (tag == "i") { //use italics font - p_rt->push_color(headline_color); + p_rt->push_font(doc_italic_font); pos = brk_end + 1; tag_stack.push_front(tag); } else if (tag == "code" || tag == "codeblock") { @@ -1770,17 +1770,17 @@ void EditorHelp::_notification(int p_what) { _wait_for_thread(); _update_doc(); } break; + case NOTIFICATION_THEME_CHANGED: { if (is_inside_tree()) { _class_desc_resized(true); } update_toggle_scripts_button(); } break; - case NOTIFICATION_VISIBILITY_CHANGED: + + case NOTIFICATION_VISIBILITY_CHANGED: { update_toggle_scripts_button(); - break; - default: - break; + } break; } } @@ -1897,8 +1897,6 @@ EditorHelp::EditorHelp() { class_desc->set_selection_enabled(true); - scroll_locked = false; - select_locked = false; class_desc->hide(); } @@ -2041,6 +2039,7 @@ void FindBar::_notification(int p_what) { hide_button->set_custom_minimum_size(hide_button->get_normal_texture()->get_size()); matches_label->add_theme_color_override("font_color", results_count > 0 ? get_theme_color(SNAME("font_color"), SNAME("Label")) : get_theme_color(SNAME("error_color"), SNAME("Editor"))); } break; + case NOTIFICATION_VISIBILITY_CHANGED: { set_process_unhandled_input(is_visible_in_tree()); } break; |