1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-24 15:26:15 +00:00

[NativeMenu] Fix changes lost due to incorrect rebase (menu goes under task bar, dark mode, item text get, docs) and check to ensure help menu is not using native menu on Windows.

This commit is contained in:
bruvzg
2024-03-15 13:59:47 +02:00
parent 89f70e98d2
commit ebb19c4198
5 changed files with 70 additions and 14 deletions

View File

@@ -6754,7 +6754,7 @@ EditorNode::EditorNode() {
ED_SHORTCUT_AND_COMMAND("editor/editor_settings", TTR("Editor Settings..."));
ED_SHORTCUT_OVERRIDE("editor/editor_settings", "macos", KeyModifierMask::META + Key::COMMA);
#ifdef MACOS_ENABLED
if (global_menu) {
if (global_menu && NativeMenu::get_singleton()->has_system_menu(NativeMenu::APPLICATION_MENU_ID)) {
apple_menu = memnew(PopupMenu);
apple_menu->set_system_menu(NativeMenu::APPLICATION_MENU_ID);
main_menu->add_child(apple_menu);
@@ -6879,7 +6879,9 @@ EditorNode::EditorNode() {
help_menu = memnew(PopupMenu);
help_menu->set_name(TTR("Help"));
help_menu->set_system_menu(NativeMenu::HELP_MENU_ID);
if (global_menu && NativeMenu::get_singleton()->has_system_menu(NativeMenu::HELP_MENU_ID)) {
help_menu->set_system_menu(NativeMenu::HELP_MENU_ID);
}
main_menu->add_child(help_menu);
help_menu->connect("id_pressed", callable_mp(this, &EditorNode::_menu_option));