File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -1038,7 +1038,7 @@ void BitcoinGUI::createIconMenu(QMenu *pmenu)
10381038 QAction* show_hide_action{nullptr };
10391039#ifndef Q_OS_MAC
10401040 // Note: On macOS, the Dock icon is used to provide the tray's functionality.
1041- show_hide_action = pmenu->addAction (tr ( " Show / &Hide " ), this , &BitcoinGUI::toggleHidden);
1041+ show_hide_action = pmenu->addAction (QString ( ), this , &BitcoinGUI::toggleHidden);
10421042 pmenu->addSeparator ();
10431043#endif // Q_OS_MAC
10441044
@@ -1069,6 +1069,17 @@ void BitcoinGUI::createIconMenu(QMenu *pmenu)
10691069 pmenu->addSeparator ();
10701070 pmenu->addAction (quitAction);
10711071#endif // Q_OS_MAC
1072+
1073+ connect (
1074+ // Using QSystemTrayIcon::Context is not reliable.
1075+ // See https://bugreports.qt.io/browse/QTBUG-91697
1076+ pmenu, &QMenu::aboutToShow,
1077+ [this , show_hide_action] {
1078+ if (show_hide_action) show_hide_action->setText (
1079+ (!isHidden () && !isMinimized () && !GUIUtil::isObscured (this )) ?
1080+ tr (" &Hide" ) :
1081+ tr (" S&how" ));
1082+ });
10721083}
10731084
10741085void BitcoinGUI::optionsClicked ()
You can’t perform that action at this time.
0 commit comments