You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-26 15:46:23 +00:00
Merge pull request #23114 from groud/allow_smaller_dock_width
Allow the editor dock to have a lower width
This commit is contained in:
@@ -4972,7 +4972,7 @@ EditorNode::EditorNode() {
|
|||||||
dock_vb->add_child(dock_hb);
|
dock_vb->add_child(dock_hb);
|
||||||
|
|
||||||
dock_select = memnew(Control);
|
dock_select = memnew(Control);
|
||||||
dock_select->set_custom_minimum_size(Size2(128, 64) * EDSCALE);
|
dock_select->set_custom_minimum_size(Size2(64, 0) * EDSCALE);
|
||||||
dock_select->connect("gui_input", this, "_dock_select_input");
|
dock_select->connect("gui_input", this, "_dock_select_input");
|
||||||
dock_select->connect("draw", this, "_dock_select_draw");
|
dock_select->connect("draw", this, "_dock_select_draw");
|
||||||
dock_select->connect("mouse_exited", this, "_dock_popup_exit");
|
dock_select->connect("mouse_exited", this, "_dock_popup_exit");
|
||||||
@@ -4983,7 +4983,7 @@ EditorNode::EditorNode() {
|
|||||||
dock_select_rect_over = -1;
|
dock_select_rect_over = -1;
|
||||||
dock_popup_selected = -1;
|
dock_popup_selected = -1;
|
||||||
for (int i = 0; i < DOCK_SLOT_MAX; i++) {
|
for (int i = 0; i < DOCK_SLOT_MAX; i++) {
|
||||||
dock_slot[i]->set_custom_minimum_size(Size2(230, 220) * EDSCALE);
|
dock_slot[i]->set_custom_minimum_size(Size2(0, 64) * EDSCALE);
|
||||||
dock_slot[i]->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
dock_slot[i]->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||||
dock_slot[i]->set_popup(dock_select_popup);
|
dock_slot[i]->set_popup(dock_select_popup);
|
||||||
dock_slot[i]->connect("pre_popup_pressed", this, "_dock_pre_popup", varray(i));
|
dock_slot[i]->connect("pre_popup_pressed", this, "_dock_pre_popup", varray(i));
|
||||||
@@ -5499,8 +5499,8 @@ EditorNode::EditorNode() {
|
|||||||
right_r_vsplit->hide();
|
right_r_vsplit->hide();
|
||||||
|
|
||||||
// Add some offsets to left_r and main hsplits to make LEFT_R and RIGHT_L docks wider than minsize
|
// Add some offsets to left_r and main hsplits to make LEFT_R and RIGHT_L docks wider than minsize
|
||||||
left_r_hsplit->set_split_offset(40 * EDSCALE);
|
left_r_hsplit->set_split_offset(100 * EDSCALE);
|
||||||
main_hsplit->set_split_offset(-40 * EDSCALE);
|
main_hsplit->set_split_offset(-100 * EDSCALE);
|
||||||
|
|
||||||
// Define corresponding default layout
|
// Define corresponding default layout
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user