diff options
Diffstat (limited to 'editor/connections_dialog.cpp')
-rw-r--r-- | editor/connections_dialog.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp index de5f9ecf89..f57e9cb5f8 100644 --- a/editor/connections_dialog.cpp +++ b/editor/connections_dialog.cpp @@ -47,6 +47,7 @@ #include "scene/gui/check_box.h" #include "scene/gui/label.h" #include "scene/gui/line_edit.h" +#include "scene/gui/margin_container.h" #include "scene/gui/option_button.h" #include "scene/gui/popup_menu.h" #include "scene/gui/spin_box.h" @@ -872,7 +873,13 @@ ConnectDialog::~ConnectDialog() { Control *ConnectionsDockTree::make_custom_tooltip(const String &p_text) const { // If it's not a doc tooltip, fallback to the default one. - return p_text.contains("::") ? nullptr : memnew(EditorHelpTooltip(p_text)); + if (p_text.contains("::")) { + return nullptr; + } + + EditorHelpBit *help_bit = memnew(EditorHelpBit(p_text)); + EditorHelpBitTooltip::show_tooltip(help_bit, const_cast<ConnectionsDockTree *>(this)); + return memnew(Control); // Make the standard tooltip invisible. } struct _ConnectionsDockMethodInfoSort { @@ -1458,8 +1465,8 @@ void ConnectionsDock::update_tree() { section_item = tree->create_item(root); section_item->set_text(0, class_name); - // `|` separators used in `EditorHelpTooltip` for formatting. - section_item->set_tooltip_text(0, "class|" + doc_class_name + "||"); + // `|` separators used in `EditorHelpBit`. + section_item->set_tooltip_text(0, "class|" + doc_class_name + "|"); section_item->set_icon(0, class_icon); section_item->set_selectable(0, false); section_item->set_editable(0, false); @@ -1490,8 +1497,8 @@ void ConnectionsDock::update_tree() { sinfo["args"] = argnames; signal_item->set_metadata(0, sinfo); signal_item->set_icon(0, get_editor_theme_icon(SNAME("Signal"))); - // `|` separators used in `EditorHelpTooltip` for formatting. - signal_item->set_tooltip_text(0, "signal|" + doc_class_name + "|" + String(signal_name) + "|" + signame.trim_prefix(mi.name)); + // `|` separators used in `EditorHelpBit`. + signal_item->set_tooltip_text(0, "signal|" + doc_class_name + "|" + String(signal_name)); // List existing connections. List<Object::Connection> existing_connections; |