Some control fixes and removed useless lines

This commit is contained in:
Gilles Roudiere 2017-08-19 19:10:00 +02:00
parent 523b3c11cf
commit 06256cd778
8 changed files with 10 additions and 15 deletions

View file

@ -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();

View file

@ -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);

View file

@ -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();

View file

@ -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;

View file

@ -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");