diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/doc/doc_data.cpp | 1 | ||||
-rw-r--r-- | editor/editor_help.cpp | 12 | ||||
-rw-r--r-- | editor/editor_layouts_dialog.cpp | 2 | ||||
-rw-r--r-- | editor/editor_settings.cpp | 1 | ||||
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 13 |
5 files changed, 20 insertions, 9 deletions
diff --git a/editor/doc/doc_data.cpp b/editor/doc/doc_data.cpp index 7d2159d365..041f81d063 100644 --- a/editor/doc/doc_data.cpp +++ b/editor/doc/doc_data.cpp @@ -1126,6 +1126,7 @@ Error DocData::save_classes(const String &p_default_path, const Map<String, Stri const PropertyDoc &p = c.theme_properties[i]; _write_string(f, 2, "<theme_item name=\"" + p.name + "\" type=\"" + p.type + "\">"); + _write_string(f, 3, p.description.strip_edges().xml_escape()); _write_string(f, 2, "</theme_item>"); } _write_string(f, 1, "</theme_items>"); diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index 26d793cf65..4bfb967351 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -416,6 +416,7 @@ void EditorHelp::_update_doc() { class_desc->pop(); class_desc->add_newline(); + class_desc->add_newline(); class_desc->push_color(text_color); class_desc->push_font(doc_font); class_desc->push_indent(1); @@ -441,6 +442,7 @@ void EditorHelp::_update_doc() { class_desc->pop(); class_desc->pop(); + class_desc->add_newline(); class_desc->push_indent(1); class_desc->push_table(2); class_desc->set_table_column_expand(1, 1); @@ -479,14 +481,15 @@ void EditorHelp::_update_doc() { class_desc->push_color(headline_color); _add_text(cd.properties[i].name); + class_desc->pop(); + class_desc->pop(); + if (describe) { class_desc->pop(); property_descr = true; } class_desc->pop(); - class_desc->pop(); - class_desc->pop(); } class_desc->pop(); //table @@ -519,6 +522,7 @@ void EditorHelp::_update_doc() { class_desc->pop(); class_desc->pop(); + class_desc->add_newline(); class_desc->push_font(doc_code_font); class_desc->push_indent(1); class_desc->push_table(2); @@ -876,6 +880,7 @@ void EditorHelp::_update_doc() { class_desc->pop(); class_desc->add_newline(); + class_desc->add_newline(); class_desc->push_color(text_color); class_desc->push_font(doc_font); class_desc->push_indent(1); @@ -1000,6 +1005,7 @@ void EditorHelp::_update_doc() { class_desc->pop(); // table class_desc->add_newline(); + class_desc->add_newline(); class_desc->push_color(text_color); class_desc->push_font(doc_font); @@ -1042,6 +1048,8 @@ void EditorHelp::_update_doc() { class_desc->pop(); class_desc->add_newline(); + class_desc->add_newline(); + class_desc->push_color(text_color); class_desc->push_font(doc_font); class_desc->push_indent(1); diff --git a/editor/editor_layouts_dialog.cpp b/editor/editor_layouts_dialog.cpp index 01e4762196..36f7b30016 100644 --- a/editor/editor_layouts_dialog.cpp +++ b/editor/editor_layouts_dialog.cpp @@ -120,7 +120,7 @@ EditorLayoutsDialog::EditorLayoutsDialog() { layout_names->set_anchor_and_margin(MARGIN_LEFT, ANCHOR_BEGIN, 5); layout_names->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, -5); layout_names->set_v_size_flags(Control::SIZE_EXPAND_FILL); - layout_names->set_select_mode(ItemList::SelectMode::SELECT_MULTI); + layout_names->set_select_mode(ItemList::SELECT_MULTI); layout_names->set_allow_rmb_select(true); name = memnew(LineEdit); diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 5e04bf4953..f05a75ed90 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -573,6 +573,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { _initial_set("editors/2d/bone_outline_color", Color(0.35, 0.35, 0.35)); _initial_set("editors/2d/bone_outline_size", 2); _initial_set("editors/2d/viewport_border_color", Color(0.4, 0.4, 1.0, 0.4)); + _initial_set("editors/2d/constrain_editor_view", true); _initial_set("editors/2d/warped_mouse_panning", true); _initial_set("editors/2d/simple_panning", false); _initial_set("editors/2d/scroll_to_pan", false); diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 3c24fd19b6..6560a403e5 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -3615,18 +3615,19 @@ void CanvasItemEditor::_update_scrollbars() { // Constraints the view offset and updates the scrollbars Point2 begin = canvas_item_rect.position; Point2 end = canvas_item_rect.position + canvas_item_rect.size - local_rect.size / zoom; + bool constrain_editor_view = bool(EditorSettings::get_singleton()->get("editors/2d/constrain_editor_view")); if (canvas_item_rect.size.height <= (local_rect.size.y / zoom)) { - if (ABS(begin.y - previous_update_view_offset.y) < ABS(begin.y - view_offset.y)) { + if (constrain_editor_view && ABS(begin.y - previous_update_view_offset.y) < ABS(begin.y - view_offset.y)) { view_offset.y = previous_update_view_offset.y; } v_scroll->hide(); } else { - if (view_offset.y > end.y && view_offset.y > previous_update_view_offset.y) { + if (constrain_editor_view && view_offset.y > end.y && view_offset.y > previous_update_view_offset.y) { view_offset.y = MAX(end.y, previous_update_view_offset.y); } - if (view_offset.y < begin.y && view_offset.y < previous_update_view_offset.y) { + if (constrain_editor_view && view_offset.y < begin.y && view_offset.y < previous_update_view_offset.y) { view_offset.y = MIN(begin.y, previous_update_view_offset.y); } @@ -3637,16 +3638,16 @@ void CanvasItemEditor::_update_scrollbars() { } if (canvas_item_rect.size.width <= (local_rect.size.x / zoom)) { - if (ABS(begin.x - previous_update_view_offset.x) < ABS(begin.x - view_offset.x)) { + if (constrain_editor_view && ABS(begin.x - previous_update_view_offset.x) < ABS(begin.x - view_offset.x)) { view_offset.x = previous_update_view_offset.x; } h_scroll->hide(); } else { - if (view_offset.x > end.x && view_offset.x > previous_update_view_offset.x) { + if (constrain_editor_view && view_offset.x > end.x && view_offset.x > previous_update_view_offset.x) { view_offset.x = MAX(end.x, previous_update_view_offset.x); } - if (view_offset.x < begin.x && view_offset.x < previous_update_view_offset.x) { + if (constrain_editor_view && view_offset.x < begin.x && view_offset.x < previous_update_view_offset.x) { view_offset.x = MIN(begin.x, previous_update_view_offset.x); } |