diff options
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r-- | editor/editor_node.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index cefeaeab60..bff22655ff 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -4942,11 +4942,13 @@ EditorNode::EditorNode() { //top_dark_vb->add_child(scene_tabs); //left left_l_hsplit = memnew(HSplitContainer); + left_l_hsplit->add_constant_override("separation", 8 * EDSCALE); main_vbox->add_child(left_l_hsplit); left_l_hsplit->set_v_size_flags(Control::SIZE_EXPAND_FILL); left_l_vsplit = memnew(VSplitContainer); + left_l_vsplit->add_constant_override("separation", 8 * EDSCALE); left_l_hsplit->add_child(left_l_vsplit); dock_slot[DOCK_SLOT_LEFT_UL] = memnew(TabContainer); left_l_vsplit->add_child(dock_slot[DOCK_SLOT_LEFT_UL]); @@ -4957,8 +4959,10 @@ EditorNode::EditorNode() { dock_slot[DOCK_SLOT_LEFT_BL]->hide(); left_r_hsplit = memnew(HSplitContainer); + left_r_hsplit->add_constant_override("separation", 8 * EDSCALE); left_l_hsplit->add_child(left_r_hsplit); left_r_vsplit = memnew(VSplitContainer); + left_r_hsplit->add_constant_override("separation", 8 * EDSCALE); left_r_hsplit->add_child(left_r_vsplit); dock_slot[DOCK_SLOT_LEFT_UR] = memnew(TabContainer); left_r_vsplit->add_child(dock_slot[DOCK_SLOT_LEFT_UR]); @@ -4969,6 +4973,7 @@ EditorNode::EditorNode() { //dock_slot[DOCK_SLOT_LEFT_BR]->hide(); main_hsplit = memnew(HSplitContainer); + main_hsplit->add_constant_override("separation", 8 * EDSCALE); left_r_hsplit->add_child(main_hsplit); //main_split->set_v_size_flags(Control::SIZE_EXPAND_FILL); VBoxContainer *center_vb = memnew(VBoxContainer); @@ -4976,15 +4981,18 @@ EditorNode::EditorNode() { center_vb->set_h_size_flags(Control::SIZE_EXPAND_FILL); center_split = memnew(VSplitContainer); + center_split->add_constant_override("separation", 8 * EDSCALE); //main_hsplit->add_child(center_split); center_split->set_v_size_flags(Control::SIZE_EXPAND_FILL); center_split->set_collapsed(false); center_vb->add_child(center_split); right_hsplit = memnew(HSplitContainer); + right_hsplit->add_constant_override("separation", 8 * EDSCALE); main_hsplit->add_child(right_hsplit); right_l_vsplit = memnew(VSplitContainer); + right_l_vsplit->add_constant_override("separation", 8 * EDSCALE); right_hsplit->add_child(right_l_vsplit); dock_slot[DOCK_SLOT_RIGHT_UL] = memnew(TabContainer); right_l_vsplit->add_child(dock_slot[DOCK_SLOT_RIGHT_UL]); @@ -4995,6 +5003,7 @@ EditorNode::EditorNode() { //dock_slot[DOCK_SLOT_RIGHT_BL]->hide(); right_r_vsplit = memnew(VSplitContainer); + right_r_vsplit->add_constant_override("separation", 8 * EDSCALE); right_hsplit->add_child(right_r_vsplit); dock_slot[DOCK_SLOT_RIGHT_UR] = memnew(TabContainer); right_r_vsplit->add_child(dock_slot[DOCK_SLOT_RIGHT_UR]); @@ -5048,13 +5057,12 @@ EditorNode::EditorNode() { dock_select_rect_over = -1; dock_popup_selected = -1; //dock_select_popoup->set_(Size2(20,20)); - for (int i = 0; i < DOCK_SLOT_MAX; i++) { dock_slot[i]->set_custom_minimum_size(Size2(230, 220) * EDSCALE); dock_slot[i]->set_v_size_flags(Control::SIZE_EXPAND_FILL); dock_slot[i]->set_popup(dock_select_popoup); dock_slot[i]->connect("pre_popup_pressed", this, "_dock_pre_popup", varray(i)); - + dock_slot[i]->add_constant_override("side_margin", 0); //dock_slot[i]->set_tab_align(TabContainer::ALIGN_LEFT); } @@ -5065,6 +5073,7 @@ EditorNode::EditorNode() { dock_drag_timer->connect("timeout", this, "_save_docks"); top_split = memnew(VSplitContainer); + top_split->add_constant_override("separation", 8 * EDSCALE); center_split->add_child(top_split); top_split->set_v_size_flags(Control::SIZE_EXPAND_FILL); top_split->set_collapsed(true); @@ -5092,6 +5101,7 @@ EditorNode::EditorNode() { scene_root_parent = memnew(PanelContainer); scene_root_parent->set_custom_minimum_size(Size2(0, 80) * EDSCALE); + scene_root_parent->add_style_override("panel", gui_base->get_stylebox("EditorPanel", "EditorStyles")); // Ref<StyleBox> sp = scene_root_parent->get_stylebox("panel_full","PanelContainer"); // scene_root_parent->add_style_override("panel",sp); @@ -5117,6 +5127,7 @@ EditorNode::EditorNode() { viewport = memnew(VBoxContainer); viewport->set_v_size_flags(Control::SIZE_EXPAND_FILL); + viewport->add_constant_override("separation", 0); /*for(int i=0;i<4;i++) { viewport->set_margin(Margin(i),sp->get_margin(Margin(i))); }*/ @@ -5680,7 +5691,7 @@ EditorNode::EditorNode() { _update_layouts_menu(); bottom_panel = memnew(PanelContainer); - bottom_panel->add_style_override("panel", gui_base->get_stylebox("panelf", "Panel")); + bottom_panel->add_style_override("panel", gui_base->get_stylebox("EditorPanel", "EditorStyles")); center_split->add_child(bottom_panel); center_split->set_dragger_visibility(SplitContainer::DRAGGER_HIDDEN); |