diff options
author | Gilles Roudiere <gilles.roudiere@gmail.com> | 2017-09-26 18:56:52 +0200 |
---|---|---|
committer | Gilles Roudiere <gilles.roudiere@gmail.com> | 2017-09-27 00:38:28 +0200 |
commit | 6f185cc9f7d8f9880dec01be86cf129dd0a38b84 (patch) | |
tree | 0ab2f9efc451b8d2bbae3430b61c3c42c011a099 | |
parent | ccb4a6acee24ca0e0f14599364e171b7b88f8ac4 (diff) |
Remove unecessary anchors&margins set causing bad display (sons of containers)
-rw-r--r-- | editor/animation_editor.cpp | 1 | ||||
-rw-r--r-- | editor/editor_help.cpp | 1 | ||||
-rw-r--r-- | editor/editor_log.cpp | 1 | ||||
-rw-r--r-- | editor/editor_node.cpp | 3 | ||||
-rw-r--r-- | editor/project_settings_editor.cpp | 1 | ||||
-rw-r--r-- | modules/visual_script/visual_script_editor.cpp | 1 | ||||
-rw-r--r-- | scene/gui/popup.cpp | 2 |
7 files changed, 1 insertions, 9 deletions
diff --git a/editor/animation_editor.cpp b/editor/animation_editor.cpp index 3b1a7b6665..b832b993bb 100644 --- a/editor/animation_editor.cpp +++ b/editor/animation_editor.cpp @@ -3936,7 +3936,6 @@ AnimationKeyEditor::AnimationKeyEditor() { key_editor_tab->set_custom_minimum_size(Size2(200, 0) * EDSCALE); key_editor = memnew(PropertyEditor); - key_editor->set_anchors_and_margins_preset(Control::PRESET_WIDE); key_editor->hide_top_label(); key_editor->set_name(TTR("Key")); key_editor_tab->add_child(key_editor); diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index 80e6f9807e..f2452df9f0 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -1790,7 +1790,6 @@ EditorHelp::EditorHelp() { { class_desc = memnew(RichTextLabel); vbc->add_child(class_desc); - class_desc->set_anchors_and_margins_preset(Control::PRESET_WIDE); class_desc->set_v_size_flags(SIZE_EXPAND_FILL); class_desc->add_color_override("selection_color", EDITOR_DEF("text_editor/highlighting/selection_color", Color(0.2, 0.2, 1))); class_desc->connect("meta_clicked", this, "_class_desc_select"); diff --git a/editor/editor_log.cpp b/editor/editor_log.cpp index 46f8baa4c5..407420d3d0 100644 --- a/editor/editor_log.cpp +++ b/editor/editor_log.cpp @@ -161,7 +161,6 @@ EditorLog::EditorLog() { log->set_selection_enabled(true); log->set_focus_mode(FOCUS_CLICK); log->set_custom_minimum_size(Size2(0, 180) * EDSCALE); - log->set_anchors_and_margins_preset(Control::PRESET_WIDE); log->set_v_size_flags(SIZE_EXPAND_FILL); log->set_h_size_flags(SIZE_EXPAND_FILL); vb->add_child(log); diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 3069ba97f2..21520875cd 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -5083,9 +5083,6 @@ EditorNode::EditorNode() { play_cc = memnew(CenterContainer); play_cc->set_mouse_filter(Control::MOUSE_FILTER_IGNORE); menu_hb->add_child(play_cc); - play_cc->set_anchors_and_margins_preset(Control::PRESET_WIDE); - play_cc->set_anchor_and_margin(MARGIN_BOTTOM, Control::ANCHOR_BEGIN, 10); - play_cc->set_margin(MARGIN_TOP, 5); play_button_panel = memnew(PanelContainer); // play_button_panel->add_style_override("panel", gui_base->get_stylebox("PlayButtonPanel", "EditorStyles")); diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp index 34c0d7e578..56e593e34b 100644 --- a/editor/project_settings_editor.cpp +++ b/editor/project_settings_editor.cpp @@ -1504,7 +1504,6 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) { Control *input_base = memnew(Control); input_base->set_name(TTR("Input Map")); - input_base->set_anchors_and_margins_preset(Control::PRESET_WIDE); tab_container->add_child(input_base); VBoxContainer *vbc = memnew(VBoxContainer); diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp index eea294e631..985f8a8d0e 100644 --- a/modules/visual_script/visual_script_editor.cpp +++ b/modules/visual_script/visual_script_editor.cpp @@ -3268,7 +3268,6 @@ VisualScriptEditor::VisualScriptEditor() { graph = memnew(GraphEdit); add_child(graph); graph->set_anchors_and_margins_preset(Control::PRESET_WIDE); - graph->set_h_size_flags(SIZE_EXPAND_FILL); graph->connect("node_selected", this, "_node_selected"); graph->connect("_begin_node_move", this, "_begin_node_move"); graph->connect("_end_node_move", this, "_end_node_move"); diff --git a/scene/gui/popup.cpp b/scene/gui/popup.cpp index 1460fba89a..2110298950 100644 --- a/scene/gui/popup.cpp +++ b/scene/gui/popup.cpp @@ -265,7 +265,7 @@ void PopupPanel::set_child_rect(Control *p_child) { ERR_FAIL_NULL(p_child); Ref<StyleBox> p = get_stylebox("panel"); - p_child->set_anchors_and_margins_preset(Control::PRESET_WIDE); + p_child->set_anchors_preset(Control::PRESET_WIDE); p_child->set_margin(MARGIN_LEFT, p->get_margin(MARGIN_LEFT)); p_child->set_margin(MARGIN_RIGHT, -p->get_margin(MARGIN_RIGHT)); p_child->set_margin(MARGIN_TOP, p->get_margin(MARGIN_TOP)); |