mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-20 07:52:30 +02:00
* Alt/Cmd+Left & +Right to jump between pages and Ctrl+Up & Down to change the volume.
This commit is contained in:
parent
fa33c14ccc
commit
e5c66b2b96
@ -287,11 +287,21 @@ TomahawkWindow::setupToolBar()
|
||||
ViewManager::instance(),
|
||||
SLOT( historyBack() ) );
|
||||
m_backAction->setToolTip( tr( "Go back one page" ) );
|
||||
#ifdef Q_OS_MAC
|
||||
m_backAction->setShortcut( QKeySequence( "Ctrl+Left" ) );
|
||||
#else
|
||||
m_backAction->setShortcut( QKeySequence( "Alt+Left" ) );
|
||||
#endif
|
||||
m_forwardAction = m_toolbar->addAction( ImageRegistry::instance()->pixmap( RESPATH "images/forward.svg", m_toolbar->iconSize() ),
|
||||
tr( "Forward" ),
|
||||
ViewManager::instance(),
|
||||
SLOT( historyForward() ) );
|
||||
m_forwardAction->setToolTip( tr( "Go forward one page" ) );
|
||||
#ifdef Q_OS_MAC
|
||||
m_forwardAction->setShortcut( QKeySequence( "Ctrl+Right" ) );
|
||||
#else
|
||||
m_forwardAction->setShortcut( QKeySequence( "Alt+Right" ) );
|
||||
#endif
|
||||
|
||||
m_toolbarLeftBalancer = new QWidget( this );
|
||||
m_toolbarLeftBalancer->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Preferred );
|
||||
@ -457,6 +467,16 @@ TomahawkWindow::setupShortcuts()
|
||||
QShortcut* shortcut = new QShortcut( QKeySequence( QKeySequence::Close ), this );
|
||||
QObject::connect( shortcut, SIGNAL( activated() ), ViewManager::instance(), SLOT( destroyCurrentPage() ) );
|
||||
}
|
||||
{
|
||||
// Ctrl Up for raising the volume
|
||||
QShortcut* shortcut = new QShortcut( QKeySequence( QKeySequence( "Ctrl+Up" ) ), this );
|
||||
QObject::connect( shortcut, SIGNAL( activated() ), AudioEngine::instance(), SLOT( raiseVolume() ) );
|
||||
}
|
||||
{
|
||||
// Ctrl Down for lowering the volume
|
||||
QShortcut* shortcut = new QShortcut( QKeySequence( QKeySequence( "Ctrl+Down" ) ), this );
|
||||
QObject::connect( shortcut, SIGNAL( activated() ), AudioEngine::instance(), SLOT( lowerVolume() ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user