1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Improve Docs' inheritance tree icons on newline

Uses a Non-Breaking Space to prevent the icon from detaching from the name on newline, improving the look considerably.
This commit is contained in:
Micky
2022-09-02 15:56:28 +02:00
parent 3a62c294c7
commit 126216eda0

View File

@@ -567,6 +567,8 @@ void EditorHelp::_update_doc() {
class_desc->pop(); // font
class_desc->add_newline();
const String non_breaking_space = String::chr(160);
// Inheritance tree
// Ascendents
@@ -579,7 +581,7 @@ void EditorHelp::_update_doc() {
while (!inherits.is_empty()) {
_add_type_icon(inherits);
class_desc->add_text(" "); // Extra space, otherwise icon borrows hyperlink from _add_type().
class_desc->add_text(non_breaking_space); // Otherwise icon borrows hyperlink from _add_type().
_add_type(inherits);
inherits = doc->class_list[inherits].inherits;
@@ -612,7 +614,7 @@ void EditorHelp::_update_doc() {
class_desc->add_text(" , ");
}
_add_type_icon(E.value.name);
class_desc->add_text(" "); // Extra space, otherwise icon borrows hyperlink from _add_type().
class_desc->add_text(non_breaking_space); // Otherwise icon borrows hyperlink from _add_type().
_add_type(E.value.name);
prev = true;
}