From 59f550f61b174dbb68fd8ad9402add6b80cd37d0 Mon Sep 17 00:00:00 2001 From: Dino Date: Sat, 25 Oct 2025 19:20:40 -0400 Subject: [PATCH] #1672 - Mac only fix for qt client disappearing "About..." menu items --- client/gui-qt/menu.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/client/gui-qt/menu.cpp b/client/gui-qt/menu.cpp index 8dc60189f8..3cd06f55d2 100644 --- a/client/gui-qt/menu.cpp +++ b/client/gui-qt/menu.cpp @@ -1722,21 +1722,37 @@ void mr_menu::setup_menus() }); act = main_menu->addAction(Q_(HELP_RULESET_ITEM)); +#ifdef __APPLE__ + // only needed on Mac, prevents qt from moving the menu item + act->setMenuRole(QAction::NoRole); +#endif // __APPLE__ QObject::connect(act, &QAction::triggered, [this]() { slot_help(HELP_RULESET_ITEM); }); act = main_menu->addAction(Q_(HELP_TILESET_ITEM)); +#ifdef __APPLE__ + // only needed on Mac, prevents qt from moving the menu item + act->setMenuRole(QAction::NoRole); +#endif // __APPLE__ QObject::connect(act, &QAction::triggered, [this]() { slot_help(HELP_TILESET_ITEM); }); act = main_menu->addAction(Q_(HELP_MUSICSET_ITEM)); +#ifdef __APPLE__ + // only needed on Mac, prevents qt from moving the menu item + act->setMenuRole(QAction::NoRole); +#endif // __APPLE__ QObject::connect(act, &QAction::triggered, [this]() { slot_help(HELP_MUSICSET_ITEM); }); act = main_menu->addAction(Q_(HELP_NATIONS_ITEM)); +#ifdef __APPLE__ + // only needed on Mac, prevents qt from moving the menu item + act->setMenuRole(QAction::NoRole); +#endif // __APPLE__ QObject::connect(act, &QAction::triggered, [this]() { slot_help(HELP_NATIONS_ITEM); }); @@ -1781,6 +1797,10 @@ void mr_menu::setup_menus() }); act = main_menu->addAction(Q_(HELP_ABOUT_ITEM)); +#ifdef __APPLE__ + // only needed on Mac, prevents qt from moving the menu item + act->setMenuRole(QAction::NoRole); +#endif // __APPLE__ QObject::connect(act, &QAction::triggered, [this]() { slot_help(HELP_ABOUT_ITEM); }); -- 2.31.0