diff options
author | Gilles Roudiere <gilles.roudiere@gmail.com> | 2017-08-19 19:10:00 +0200 |
---|---|---|
committer | Gilles Roudiere <gilles.roudiere@gmail.com> | 2017-08-19 19:10:00 +0200 |
commit | 06256cd7782de2d91cd9ed3bcb9a05e293397303 (patch) | |
tree | 48e2ea3efe55780838956a227ffe48ebba1bb9db /editor | |
parent | 523b3c11cf6de311cc3a711ed85ee48e72330a7b (diff) |
Some control fixes and removed useless lines
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/cube_grid_theme_editor_plugin.cpp | 1 | ||||
-rw-r--r-- | editor/plugins/sample_editor_plugin.cpp | 4 | ||||
-rw-r--r-- | editor/plugins/tile_set_editor_plugin.cpp | 1 | ||||
-rw-r--r-- | editor/project_manager.cpp | 3 | ||||
-rw-r--r-- | editor/property_editor.cpp | 6 |
5 files changed, 5 insertions, 10 deletions
diff --git a/editor/plugins/cube_grid_theme_editor_plugin.cpp b/editor/plugins/cube_grid_theme_editor_plugin.cpp index b26b2aec4f..1fcd514b31 100644 --- a/editor/plugins/cube_grid_theme_editor_plugin.cpp +++ b/editor/plugins/cube_grid_theme_editor_plugin.cpp @@ -368,7 +368,6 @@ MeshLibraryEditorPlugin::MeshLibraryEditorPlugin(EditorNode *p_node) { p_node->get_viewport()->add_child(theme_editor); theme_editor->set_area_as_parent_rect(); - theme_editor->set_anchor(MARGIN_RIGHT, Control::ANCHOR_END); theme_editor->set_anchor(MARGIN_BOTTOM, Control::ANCHOR_BEGIN); theme_editor->set_end(Point2(0, 22)); theme_editor->hide(); diff --git a/editor/plugins/sample_editor_plugin.cpp b/editor/plugins/sample_editor_plugin.cpp index 1d6417e2d5..2dd6de1683 100644 --- a/editor/plugins/sample_editor_plugin.cpp +++ b/editor/plugins/sample_editor_plugin.cpp @@ -374,8 +374,8 @@ SampleEditor::SampleEditor() { sample_texframe->add_child(info_label); info_label->set_area_as_parent_rect(); info_label->set_anchor_and_margin(MARGIN_TOP,ANCHOR_END,-15); - info_label->set_margin(MARGIN_BOTTOM,4); - info_label->set_margin(MARGIN_RIGHT,4); + info_label->set_margin(MARGIN_BOTTOM,-4); + info_label->set_margin(MARGIN_RIGHT,-4); info_label->set_align(Label::ALIGN_RIGHT); diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp index bed4727bb9..8396b4d412 100644 --- a/editor/plugins/tile_set_editor_plugin.cpp +++ b/editor/plugins/tile_set_editor_plugin.cpp @@ -294,7 +294,6 @@ TileSetEditorPlugin::TileSetEditorPlugin(EditorNode *p_node) { p_node->get_viewport()->add_child(tileset_editor); tileset_editor->set_area_as_parent_rect(); - tileset_editor->set_anchor(MARGIN_RIGHT, Control::ANCHOR_END); tileset_editor->set_anchor(MARGIN_BOTTOM, Control::ANCHOR_BEGIN); tileset_editor->set_end(Point2(0, 22)); tileset_editor->hide(); diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index dc0c888eea..1ea8440508 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -969,7 +969,6 @@ void ProjectManager::_run_project_confirm() { return; } - const String &selected = E->key(); String path = EditorSettings::get_singleton()->get("projects/" + selected); @@ -1220,7 +1219,7 @@ ProjectManager::ProjectManager() { panel->add_child(vb); vb->set_area_as_parent_rect(20 * EDSCALE); vb->set_margin(MARGIN_TOP, 4 * EDSCALE); - vb->set_margin(MARGIN_BOTTOM, 4 * EDSCALE); + vb->set_margin(MARGIN_BOTTOM, -4 * EDSCALE); vb->add_constant_override("separation", 15 * EDSCALE); String cp; diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index 2f47d3e130..90af4f1de1 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -1938,10 +1938,8 @@ CustomPropertyEditor::CustomPropertyEditor() { text_edit = memnew(TextEdit); add_child(text_edit); - text_edit->set_area_as_parent_rect(); - for (int i = 0; i < 4; i++) - text_edit->set_margin((Margin)i, 5); - text_edit->set_margin(MARGIN_BOTTOM, 30); + text_edit->set_area_as_parent_rect(5); + text_edit->set_margin(MARGIN_BOTTOM, -30); text_edit->hide(); text_edit->connect("text_changed", this, "_text_edit_changed"); |