Skip to content

Commit ab0bc7e

Browse files
committed
[macOS] Fix embedded menu/spacer relative position.
1 parent ca45211 commit ab0bc7e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

editor/editor_node.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7401,13 +7401,13 @@ void EditorNode::_update_main_menu_type() {
74017401
menu_btn_spacer = memnew(Control);
74027402
menu_btn_spacer->set_custom_minimum_size(Vector2(8, 0) * EDSCALE);
74037403
title_bar->add_child(menu_btn_spacer);
7404-
title_bar->move_child(menu_btn_spacer, 0);
7404+
title_bar->move_child(menu_btn_spacer, left_menu_spacer ? left_menu_spacer->get_index() + 1 : 0);
74057405
#endif
74067406
title_bar->add_child(main_menu_button);
74077407
if (menu_btn_spacer == nullptr) {
7408-
title_bar->move_child(main_menu_button, 0);
7408+
title_bar->move_child(main_menu_button, left_menu_spacer ? left_menu_spacer->get_index() + 1 : 0);
74097409
} else {
7410-
title_bar->move_child(main_menu_button, 1);
7410+
title_bar->move_child(main_menu_button, menu_btn_spacer->get_index() + 1);
74117411
}
74127412
memdelete_notnull(main_menu_bar);
74137413
main_menu_bar = nullptr;
@@ -7442,7 +7442,7 @@ void EditorNode::_update_main_menu_type() {
74427442
}
74437443

74447444
title_bar->add_child(main_menu_bar);
7445-
title_bar->move_child(main_menu_bar, 0);
7445+
title_bar->move_child(main_menu_bar, left_menu_spacer ? left_menu_spacer->get_index() + 1 : 0);
74467446

74477447
memdelete_notnull(menu_btn_spacer);
74487448
memdelete_notnull(main_menu_button);

0 commit comments

Comments
 (0)