Skip to content

Commit cea7ff5

Browse files
committed
GUI - show Link shortcuts in metro button tooltips
1 parent e911545 commit cea7ff5

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

app/gui/qt/widgets/sonicpimetro.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,20 @@ SonicPiMetro::SonicPiMetro(std::shared_ptr<SonicPi::QtAPIClient> spClient, std::
2929
enableLinkButton->setObjectName("enableLinkButton");
3030
enableLinkButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
3131
enableLinkButton->setFlat(true);
32-
enableLinkButton->setToolTip(tr("Enable/Disable network sync.\nThis controls whether the Link metronome will synchronise with other Link metronomes on the local network."));
32+
#ifdef Q_OS_MAC
33+
QString link_shortcut = QKeySequence("Ctrl+t").toString(QKeySequence::NativeText);
34+
#else
35+
QString link_shortcut = QKeySequence("alt+t").toString(QKeySequence::NativeText);
36+
#endif
37+
enableLinkButton->setToolTip(tr("Enable/Disable network sync.\nThis controls whether the Link metronome will synchronise with other Link metronomes on the local network.") + "\n(" + link_shortcut + ")");
3338

3439
tapButton = new QPushButton(tr("Tap"));
3540
tapButton->setAutoFillBackground(true);
3641
tapButton->setObjectName("tapButton");
3742
tapButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
3843
tapButton->setFlat(true);
39-
tapButton->setToolTip(tr("Tap tempo.\nClick repeatedly to the beat to set the BPM manually.\nAccuracy increases with every additional click."));
44+
45+
tapButton->setToolTip(tr("Tap tempo.\nClick repeatedly to the beat to set the BPM manually.\nAccuracy increases with every additional click.") + "\n(" + QKeySequence("Shift+Return").toString(QKeySequence::NativeText) + ")");
4046

4147

4248
QHBoxLayout* metro_layout = new QHBoxLayout;

0 commit comments

Comments
 (0)