diff options
author | Poommetee Ketson <poommetee@protonmail.com> | 2017-11-06 09:11:39 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-06 09:11:39 +0700 |
commit | d37d4ae1cd347520fc3dd9985ace740892d1771e (patch) | |
tree | 163ef7cb2ffa02af460ffa4436f2e23c7e6e7d05 | |
parent | 5ceaae51f7118c1ba2886e1f92f3f1f3252a7187 (diff) | |
parent | 8c6cc4dc2d6a55bb3a681756f819689c4bc2d4d6 (diff) |
Merge pull request #12631 from poke1024/docspolish
Docs cosmetics: add more space to Signals, Enumerations, Constants
-rw-r--r-- | editor/editor_help.cpp | 75 |
1 files changed, 47 insertions, 28 deletions
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index 2c4d3035a4..03cd2c9b6b 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -1045,12 +1045,17 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) { class_desc->pop(); // end monofont if (cd.signals[i].description != "") { + class_desc->push_font(doc_font); class_desc->push_color(comment_color); - class_desc->add_text(" "); + class_desc->push_indent(1); + // class_desc->add_text(" "); _add_text(cd.signals[i].description); + class_desc->pop(); // indent class_desc->pop(); + class_desc->pop(); // font } class_desc->add_newline(); + class_desc->add_newline(); } class_desc->pop(); @@ -1129,11 +1134,14 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) { class_desc->pop(); if (enum_list[i].description != "") { class_desc->push_font(doc_font); - class_desc->add_text(" "); + //class_desc->add_text(" "); + class_desc->push_indent(1); class_desc->push_color(comment_color); _add_text(enum_list[i].description); class_desc->pop(); class_desc->pop(); + class_desc->pop(); // indent + class_desc->add_newline(); } class_desc->add_newline(); @@ -1177,11 +1185,14 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) { class_desc->pop(); if (constants[i].description != "") { class_desc->push_font(doc_font); - class_desc->add_text(" "); + class_desc->push_indent(1); + //class_desc->add_text(" "); class_desc->push_color(comment_color); _add_text(constants[i].description); class_desc->pop(); class_desc->pop(); + class_desc->pop(); // indent + class_desc->add_newline(); } class_desc->add_newline(); @@ -1231,54 +1242,62 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) { method_line[cd.properties[i].name] = class_desc->get_line_count() - 2; + class_desc->push_table(2); + class_desc->set_table_column_expand(1, 1); + + class_desc->push_cell(); class_desc->push_font(doc_code_font); _add_type(cd.properties[i].type, cd.properties[i].enumeration); - class_desc->add_text(" "); + class_desc->pop(); // font + class_desc->pop(); // cell + + class_desc->push_cell(); + class_desc->push_font(doc_code_font); class_desc->push_color(headline_color); _add_text(cd.properties[i].name); - class_desc->pop(); //color - - class_desc->add_text(" "); + class_desc->pop(); // color + class_desc->pop(); // font + class_desc->pop(); // cell - class_desc->pop(); //font + //class_desc->add_text(" "); if (cd.properties[i].setter != "") { - class_desc->push_font(doc_font); - - class_desc->push_indent(2); - class_desc->push_color(comment_color); - class_desc->add_text("Setter: "); - class_desc->pop(); + class_desc->push_cell(); + class_desc->pop(); // cell + class_desc->push_cell(); + class_desc->push_font(doc_code_font); class_desc->push_color(text_color); class_desc->add_text(cd.properties[i].setter + "(value)"); - class_desc->pop(); //color - - class_desc->pop(); //indent - - class_desc->pop(); //font + class_desc->pop(); // color + class_desc->push_color(comment_color); + class_desc->add_text(" setter"); + class_desc->pop(); // color + class_desc->pop(); // font + class_desc->pop(); // cell } if (cd.properties[i].getter != "") { - class_desc->push_font(doc_font); - - class_desc->push_indent(2); - class_desc->push_color(comment_color); - class_desc->add_text("Getter: "); - class_desc->pop(); + class_desc->push_cell(); + class_desc->pop(); // cell + class_desc->push_cell(); + class_desc->push_font(doc_code_font); class_desc->push_color(text_color); class_desc->add_text(cd.properties[i].getter + "()"); class_desc->pop(); //color - - class_desc->pop(); //indent - + class_desc->push_color(comment_color); + class_desc->add_text(" getter"); + class_desc->pop(); //color class_desc->pop(); //font + class_desc->pop(); //cell } + class_desc->pop(); // table + class_desc->add_newline(); class_desc->push_color(text_color); |