@@ -7778,13 +7778,6 @@ void EditorNode::_update_main_menu_type() {
77787778 }
77797779 memdelete_notnull (main_menu_bar);
77807780 main_menu_bar = nullptr ;
7781-
7782- if (project_run_bar != nullptr ) {
7783- // Adjust spacers to center 2D / 3D / Script buttons.
7784- 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 );
7785- left_spacer->set_custom_minimum_size (Size2 (MAX (0 , max_w - main_menu_button->get_minimum_size ().x ), 0 ));
7786- 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 ));
7787- }
77887781 } else {
77897782 main_menu_bar = memnew (MenuBar);
77907783 main_menu_bar->set_mouse_filter (Control::MOUSE_FILTER_STOP);
@@ -7815,13 +7808,6 @@ void EditorNode::_update_main_menu_type() {
78157808 memdelete_notnull (main_menu_button);
78167809 menu_btn_spacer = nullptr ;
78177810 main_menu_button = nullptr ;
7818-
7819- if (project_run_bar != nullptr ) {
7820- // Adjust spacers to center 2D / 3D / Script buttons.
7821- 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 );
7822- left_spacer->set_custom_minimum_size (Size2 (MAX (0 , max_w - main_menu_bar->get_minimum_size ().x ), 0 ));
7823- 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 ));
7824- }
78257811 }
78267812}
78277813
@@ -9194,16 +9180,6 @@ EditorNode::EditorNode() {
91949180 add_child (screenshot_timer);
91959181 screenshot_timer->set_owner (get_owner ());
91969182
9197- // Adjust spacers to center 2D / 3D / Script buttons.
9198- if (main_menu_button != nullptr ) {
9199- 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 );
9200- left_spacer->set_custom_minimum_size (Size2 (MAX (0 , max_w - main_menu_button->get_minimum_size ().x ), 0 ));
9201- 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 ));
9202- } else {
9203- 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 );
9204- left_spacer->set_custom_minimum_size (Size2 (MAX (0 , max_w - main_menu_bar->get_minimum_size ().x ), 0 ));
9205- 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 ));
9206- }
92079183 // Extend menu bar to window title.
92089184 if (can_expand) {
92099185 DisplayServer::get_singleton ()->process_events ();
0 commit comments