You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-02 16:48:55 +00:00
Merge pull request #111499 from DexterFstone/Keep-the-bottom-panel-size-separate
Keep the bottom panel size separate.
This commit is contained in:
@@ -6012,9 +6012,6 @@ void EditorNode::_load_editor_layout() {
|
||||
void EditorNode::_save_central_editor_layout_to_config(Ref<ConfigFile> p_config_file) {
|
||||
// Bottom panel.
|
||||
|
||||
int center_split_offset = center_split->get_split_offset();
|
||||
p_config_file->set_value(EDITOR_NODE_CONFIG_SECTION, "center_split_offset", center_split_offset);
|
||||
|
||||
bottom_panel->save_layout_to_config(p_config_file, EDITOR_NODE_CONFIG_SECTION);
|
||||
|
||||
// Debugger tab.
|
||||
@@ -6032,11 +6029,6 @@ void EditorNode::_load_central_editor_layout_from_config(Ref<ConfigFile> p_confi
|
||||
|
||||
bottom_panel->load_layout_from_config(p_config_file, EDITOR_NODE_CONFIG_SECTION);
|
||||
|
||||
if (p_config_file->has_section_key(EDITOR_NODE_CONFIG_SECTION, "center_split_offset")) {
|
||||
int center_split_offset = p_config_file->get_value(EDITOR_NODE_CONFIG_SECTION, "center_split_offset");
|
||||
center_split->set_split_offset(center_split_offset);
|
||||
}
|
||||
|
||||
// Debugger tab.
|
||||
|
||||
if (p_config_file->has_section_key(EDITOR_NODE_CONFIG_SECTION, "selected_default_debugger_tab_idx")) {
|
||||
@@ -7722,6 +7714,10 @@ void EditorNode::_add_to_main_menu(const String &p_name, PopupMenu *p_menu) {
|
||||
}
|
||||
}
|
||||
|
||||
void EditorNode::_bottom_panel_resized() {
|
||||
bottom_panel->set_bottom_panel_offset(center_split->get_split_offset());
|
||||
}
|
||||
|
||||
#ifdef ANDROID_ENABLED
|
||||
void EditorNode::_touch_actions_panel_mode_changed() {
|
||||
int panel_mode = EDITOR_GET("interface/touchscreen/touch_actions_panel");
|
||||
@@ -8171,6 +8167,7 @@ EditorNode::EditorNode() {
|
||||
center_split->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
center_split->set_collapsed(true);
|
||||
center_vb->add_child(center_split);
|
||||
center_split->connect("drag_ended", callable_mp(this, &EditorNode::_bottom_panel_resized));
|
||||
|
||||
right_hsplit = memnew(DockSplitContainer);
|
||||
right_hsplit->set_name("DockHSplitRight");
|
||||
|
||||
Reference in New Issue
Block a user