@@ -7777,13 +7777,6 @@ void EditorNode::_update_main_menu_type() {
77777777 }
77787778 memdelete_notnull (main_menu_bar);
77797779 main_menu_bar = nullptr ;
7780-
7781- if (project_run_bar != nullptr ) {
7782- // Adjust spacers to center 2D / 3D / Script buttons.
7783- int max_w = MAX (project_run_bar->get_minimum_size ().x + right_menu_hb->get_minimum_size ().x , main_menu_button->get_minimum_size ().x );
7784- left_spacer->set_custom_minimum_size (Size2 (MAX (0 , max_w - main_menu_button->get_minimum_size ().x ), 0 ));
7785- right_spacer->set_custom_minimum_size (Size2 (MAX (0 , max_w - project_run_bar->get_minimum_size ().x - right_menu_hb->get_minimum_size ().x ), 0 ));
7786- }
77877780 } else {
77887781 main_menu_bar = memnew (MenuBar);
77897782 main_menu_bar->set_mouse_filter (Control::MOUSE_FILTER_STOP);
@@ -7814,13 +7807,6 @@ void EditorNode::_update_main_menu_type() {
78147807 memdelete_notnull (main_menu_button);
78157808 menu_btn_spacer = nullptr ;
78167809 main_menu_button = nullptr ;
7817-
7818- if (project_run_bar != nullptr ) {
7819- // Adjust spacers to center 2D / 3D / Script buttons.
7820- int max_w = MAX (project_run_bar->get_minimum_size ().x + right_menu_hb->get_minimum_size ().x , main_menu_bar->get_minimum_size ().x );
7821- left_spacer->set_custom_minimum_size (Size2 (MAX (0 , max_w - main_menu_bar->get_minimum_size ().x ), 0 ));
7822- right_spacer->set_custom_minimum_size (Size2 (MAX (0 , max_w - project_run_bar->get_minimum_size ().x - right_menu_hb->get_minimum_size ().x ), 0 ));
7823- }
78247810 }
78257811}
78267812
@@ -9179,16 +9165,6 @@ EditorNode::EditorNode() {
91799165 add_child (screenshot_timer);
91809166 screenshot_timer->set_owner (get_owner ());
91819167
9182- // Adjust spacers to center 2D / 3D / Script buttons.
9183- if (main_menu_button != nullptr ) {
9184- int max_w = MAX (project_run_bar->get_minimum_size ().x + right_menu_hb->get_minimum_size ().x , main_menu_button->get_minimum_size ().x );
9185- left_spacer->set_custom_minimum_size (Size2 (MAX (0 , max_w - main_menu_button->get_minimum_size ().x ), 0 ));
9186- right_spacer->set_custom_minimum_size (Size2 (MAX (0 , max_w - project_run_bar->get_minimum_size ().x - right_menu_hb->get_minimum_size ().x ), 0 ));
9187- } else {
9188- int max_w = MAX (project_run_bar->get_minimum_size ().x + right_menu_hb->get_minimum_size ().x , main_menu_bar->get_minimum_size ().x );
9189- left_spacer->set_custom_minimum_size (Size2 (MAX (0 , max_w - main_menu_bar->get_minimum_size ().x ), 0 ));
9190- right_spacer->set_custom_minimum_size (Size2 (MAX (0 , max_w - project_run_bar->get_minimum_size ().x - right_menu_hb->get_minimum_size ().x ), 0 ));
9191- }
91929168 // Extend menu bar to window title.
91939169 if (can_expand) {
91949170 DisplayServer::get_singleton ()->process_events ();
0 commit comments