diff options
author | Daniel Schürmann <daschuer@mixxx.org> | 2021-03-20 19:40:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-20 19:40:52 +0100 |
commit | 780a209cee6c1fb2a49b2c8fa8e1063588e811f2 (patch) | |
tree | 0720987833698694b88f9210d6d79f14d9b30e4a | |
parent | 917d42e74c3f8605114e6f2e2338f3d9d65eef86 (diff) | |
parent | 7b02ab0c289a5290e065dc716bcf7188873cb69c (diff) |
Merge pull request #3708 from ronso0/help-hyperlink
Help menu: use north-east arrow as hyperlink suffix
-rw-r--r-- | src/widget/wmainmenubar.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/widget/wmainmenubar.cpp b/src/widget/wmainmenubar.cpp index 86bc7ab41f..343fdbb0e0 100644 --- a/src/widget/wmainmenubar.cpp +++ b/src/widget/wmainmenubar.cpp @@ -521,7 +521,13 @@ void WMainMenuBar::initialize() { // HELP MENU QMenu* pHelpMenu = new QMenu(tr("&Help"), this); - QString externalLinkSuffix = " =>"; + QString externalLinkSuffix; +#ifndef __APPLE__ + // According to Apple's Human Interface Guidelines devs are encouraged + // to not use custom icons in menus. + // https://developer.apple.com/design/human-interface-guidelines/macos/menus/menu-anatomy/ + externalLinkSuffix = QChar(' ') + QChar(0x2197); // north-east arrow +#endif QString supportTitle = tr("&Community Support") + externalLinkSuffix; QString supportText = tr("Get help with Mixxx"); @@ -535,6 +541,7 @@ void WMainMenuBar::initialize() { QDir resourceDir(m_pConfig->getResourcePath()); // Default to the mixxx.org hosted version of the manual. QUrl qManualUrl(MIXXX_MANUAL_URL); + QString manualSuffix; #if defined(__APPLE__) // FIXME: We don't include the PDF manual in the bundle on OSX. // Default to the web-hosted version. @@ -543,18 +550,23 @@ void WMainMenuBar::initialize() { if (resourceDir.exists(MIXXX_MANUAL_FILENAME)) { qManualUrl = QUrl::fromLocalFile( resourceDir.absoluteFilePath(MIXXX_MANUAL_FILENAME)); + } else { + manualSuffix = externalLinkSuffix; } #elif defined(__LINUX__) - // On GNU/Linux, the manual is installed to e.g. /usr/share/mixxx/doc/ + // On GNU/Linux, the manual is installed to e.g. /usr/share/doc/mixxx/ if (resourceDir.cd("../doc/mixxx") && resourceDir.exists(MIXXX_MANUAL_FILENAME)) { qManualUrl = QUrl::fromLocalFile( resourceDir.absoluteFilePath(MIXXX_MANUAL_FILENAME)); + } else { + manualSuffix = externalLinkSuffix; } #else // No idea, default to the mixxx.org hosted version. + manualSuffix = externalLinkSuffix; #endif - QString manualTitle = tr("&User Manual") + externalLinkSuffix; + QString manualTitle = tr("&User Manual") + manualSuffix; QString manualText = tr("Read the Mixxx user manual."); auto* pHelpManual = new QAction(manualTitle, this); pHelpManual->setStatusTip(manualText); |