Merge pull request #2522 from Umcaruje/fix2503
Fix incorrect UI for Automation Track on Mac OS X
This commit is contained in:
@@ -595,7 +595,12 @@ const QString AutomationPattern::name() const
|
||||
{
|
||||
return m_objects.first()->fullDisplayName();
|
||||
}
|
||||
return tr( "Drag a control while pressing <Ctrl>" );
|
||||
return tr( "Drag a control while pressing <%1>" ).arg(
|
||||
#ifdef LMMS_BUILD_APPLE
|
||||
"⌘");
|
||||
#else
|
||||
"Ctrl");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -651,8 +651,13 @@ void TrackContentObjectView::mousePressEvent( QMouseEvent * me )
|
||||
s_textFloat->setTitle( tr( "Current position" ) );
|
||||
delete m_hint;
|
||||
m_hint = TextFloat::displayMessage( tr( "Hint" ),
|
||||
tr( "Press <Ctrl> and drag to make "
|
||||
"a copy." ),
|
||||
tr( "Press <%1> and drag to make "
|
||||
"a copy." ).arg(
|
||||
#ifdef LMMS_BUILD_APPLE
|
||||
"⌘"),
|
||||
#else
|
||||
"Ctrl"),
|
||||
#endif
|
||||
embed::getIconPixmap( "hint" ), 0 );
|
||||
}
|
||||
else if( !m_tco->getAutoResize() )
|
||||
@@ -664,8 +669,13 @@ void TrackContentObjectView::mousePressEvent( QMouseEvent * me )
|
||||
s_textFloat->setTitle( tr( "Current length" ) );
|
||||
delete m_hint;
|
||||
m_hint = TextFloat::displayMessage( tr( "Hint" ),
|
||||
tr( "Press <Ctrl> for free "
|
||||
"resizing." ),
|
||||
tr( "Press <%1> for free "
|
||||
"resizing." ).arg(
|
||||
#ifdef LMMS_BUILD_APPLE
|
||||
"⌘"),
|
||||
#else
|
||||
"Ctrl"),
|
||||
#endif
|
||||
embed::getIconPixmap( "hint" ), 0 );
|
||||
}
|
||||
// s_textFloat->reparent( this );
|
||||
@@ -933,7 +943,12 @@ void TrackContentObjectView::contextMenuEvent( QContextMenuEvent * cme )
|
||||
tr( "Paste" ), m_tco, SLOT( paste() ) );
|
||||
contextMenu.addSeparator();
|
||||
contextMenu.addAction( embed::getIconPixmap( "muted" ),
|
||||
tr( "Mute/unmute (<Ctrl> + middle click)" ),
|
||||
tr( "Mute/unmute (<%1> + middle click)" ).arg(
|
||||
#ifdef LMMS_BUILD_APPLE
|
||||
"⌘"),
|
||||
#else
|
||||
"Ctrl"),
|
||||
#endif
|
||||
m_tco, SLOT( toggleMute() ) );
|
||||
constructContextMenu( &contextMenu );
|
||||
|
||||
@@ -1569,8 +1584,13 @@ TrackOperationsWidget::TrackOperationsWidget( TrackView * parent ) :
|
||||
"track_op_grip" ) );
|
||||
}
|
||||
|
||||
ToolTip::add( this, tr( "Press <Ctrl> while clicking on move-grip "
|
||||
"to begin a new drag'n'drop-action." ) );
|
||||
ToolTip::add( this, tr( "Press <%1> while clicking on move-grip "
|
||||
"to begin a new drag'n'drop-action." ).arg(
|
||||
#ifdef LMMS_BUILD_APPLE
|
||||
"⌘") );
|
||||
#else
|
||||
"Ctrl") );
|
||||
#endif
|
||||
|
||||
QMenu * toMenu = new QMenu( this );
|
||||
toMenu->setFont( pointSize<9>( toMenu->font() ) );
|
||||
@@ -1755,7 +1775,7 @@ void TrackOperationsWidget::updateMenu()
|
||||
toMenu->addAction( embed::getIconPixmap( "cancel", 16, 16 ),
|
||||
tr( "Remove this track" ),
|
||||
this, SLOT( removeTrack() ) );
|
||||
|
||||
|
||||
if( ! m_trackView->trackContainerView()->fixedTCOs() )
|
||||
{
|
||||
toMenu->addAction( tr( "Clear this track" ), this, SLOT( clearTrack() ) );
|
||||
@@ -2738,6 +2758,3 @@ void TrackView::createTCOView( TrackContentObject * tco )
|
||||
}
|
||||
tco->selectViewOnCreate( false );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -324,14 +324,24 @@ void TimeLineWidget::mousePressEvent( QMouseEvent* event )
|
||||
{
|
||||
delete m_hint;
|
||||
m_hint = TextFloat::displayMessage( tr( "Hint" ),
|
||||
tr( "Press <Ctrl> to disable magnetic loop points." ),
|
||||
tr( "Press <%1> to disable magnetic loop points." ).arg(
|
||||
#ifdef LMMS_BUILD_APPLE
|
||||
"⌘"),
|
||||
#else
|
||||
"Ctrl"),
|
||||
#endif
|
||||
embed::getIconPixmap( "hint" ), 0 );
|
||||
}
|
||||
else if( m_action == MoveLoopEnd )
|
||||
{
|
||||
delete m_hint;
|
||||
m_hint = TextFloat::displayMessage( tr( "Hint" ),
|
||||
tr( "Hold <Shift> to move the begin loop point; Press <Ctrl> to disable magnetic loop points." ),
|
||||
tr( "Hold <Shift> to move the begin loop point; Press <%1> to disable magnetic loop points." ).arg(
|
||||
#ifdef LMMS_BUILD_APPLE
|
||||
"⌘"),
|
||||
#else
|
||||
"Ctrl"),
|
||||
#endif
|
||||
embed::getIconPixmap( "hint" ), 0 );
|
||||
}
|
||||
|
||||
@@ -401,6 +411,3 @@ void TimeLineWidget::mouseReleaseEvent( QMouseEvent* event )
|
||||
if ( m_action == SelectSongTCO ) { emit selectionFinished(); }
|
||||
m_action = NoAction;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1199,7 +1199,7 @@ void AutomationEditor::paintEvent(QPaintEvent * pe )
|
||||
//Don't bother doing/rendering anything if there is no automation points
|
||||
if( time_map.size() > 0 )
|
||||
{
|
||||
timeMap::iterator it = time_map.begin();
|
||||
timeMap::iterator it = time_map.begin();
|
||||
while( it+1 != time_map.end() )
|
||||
{
|
||||
// skip this section if it occurs completely before the
|
||||
@@ -1464,7 +1464,7 @@ void AutomationEditor::wheelEvent(QWheelEvent * we )
|
||||
y--;
|
||||
}
|
||||
y = qBound( 0, y, m_zoomingYModel.size() - 1 );
|
||||
m_zoomingYModel.setValue( y );
|
||||
m_zoomingYModel.setValue( y );
|
||||
}
|
||||
else if( we->modifiers() & Qt::ControlModifier && we->modifiers() & Qt::AltModifier )
|
||||
{
|
||||
@@ -2140,11 +2140,26 @@ AutomationEditorWindow::AutomationEditorWindow() :
|
||||
/*DropToolBar *copyPasteActionsToolBar = addDropToolBarToTop(tr("Copy paste actions"));*/
|
||||
|
||||
QAction* cutAction = new QAction(embed::getIconPixmap("edit_cut"),
|
||||
tr("Cut selected values (Ctrl+X)"), this);
|
||||
tr("Cut selected values (%1+X)").arg(
|
||||
#ifdef LMMS_BUILD_APPLE
|
||||
"⌘"), this);
|
||||
#else
|
||||
"Ctrl"), this);
|
||||
#endif
|
||||
QAction* copyAction = new QAction(embed::getIconPixmap("edit_copy"),
|
||||
tr("Copy selected values (Ctrl+C)"), this);
|
||||
tr("Copy selected values (%1+C)").arg(
|
||||
#ifdef LMMS_BUILD_APPLE
|
||||
"⌘"), this);
|
||||
#else
|
||||
"Ctrl"), this);
|
||||
#endif
|
||||
QAction* pasteAction = new QAction(embed::getIconPixmap("edit_paste"),
|
||||
tr("Paste values from clipboard (Ctrl+V)"), this);
|
||||
tr("Paste values from clipboard (%1+V)").arg(
|
||||
#ifdef LMMS_BUILD_APPLE
|
||||
"⌘"), this);
|
||||
#else
|
||||
"Ctrl"), this);
|
||||
#endif
|
||||
|
||||
cutAction->setWhatsThis(
|
||||
tr( "Click here and selected values will be cut into the "
|
||||
|
||||
@@ -2429,7 +2429,7 @@ void PianoRoll::dragNotes( int x, int y, bool alt, bool shift, bool ctrl )
|
||||
// If shift is pressed we resize and rearrange only the selected notes
|
||||
// If shift + ctrl then we also rearrange all posterior notes (sticky)
|
||||
// If shift is pressed but only one note is selected, apply sticky
|
||||
|
||||
|
||||
if (shift)
|
||||
{
|
||||
// Algorithm:
|
||||
@@ -3981,8 +3981,13 @@ PianoRollWindow::PianoRollWindow() :
|
||||
"mode you can add, resize and move notes. This "
|
||||
"is the default mode which is used most of the time. "
|
||||
"You can also press 'Shift+D' on your keyboard to "
|
||||
"activate this mode. In this mode, hold Ctrl to "
|
||||
"temporarily go into select mode." ) );
|
||||
"activate this mode. In this mode, hold %1 to "
|
||||
"temporarily go into select mode." ).arg(
|
||||
#ifdef LMMS_BUILD_APPLE
|
||||
"⌘") );
|
||||
#else
|
||||
"Ctrl") );
|
||||
#endif
|
||||
eraseAction->setWhatsThis(
|
||||
tr( "Click here and erase mode will be activated. In this "
|
||||
"mode you can erase notes. You can also press "
|
||||
@@ -3990,8 +3995,13 @@ PianoRollWindow::PianoRollWindow() :
|
||||
selectAction->setWhatsThis(
|
||||
tr( "Click here and select mode will be activated. "
|
||||
"In this mode you can select notes. Alternatively, "
|
||||
"you can hold Ctrl in draw mode to temporarily use "
|
||||
"select mode." ) );
|
||||
"you can hold %1 in draw mode to temporarily use "
|
||||
"select mode." ).arg(
|
||||
#ifdef LMMS_BUILD_APPLE
|
||||
"⌘") );
|
||||
#else
|
||||
"Ctrl") );
|
||||
#endif
|
||||
detuneAction->setWhatsThis(
|
||||
tr( "Click here and detune mode will be activated. "
|
||||
"In this mode you can click a note to open its "
|
||||
@@ -4010,13 +4020,28 @@ PianoRollWindow::PianoRollWindow() :
|
||||
DropToolBar *copyPasteActionsToolBar = addDropToolBarToTop(tr("Copy paste controls"));
|
||||
|
||||
QAction* cutAction = new QAction(embed::getIconPixmap("edit_cut"),
|
||||
tr("Cut selected notes (Ctrl+X)"), this);
|
||||
tr("Cut selected notes (%1+X)").arg(
|
||||
#ifdef LMMS_BUILD_APPLE
|
||||
"⌘"), this);
|
||||
#else
|
||||
"Ctrl"), this);
|
||||
#endif
|
||||
|
||||
QAction* copyAction = new QAction(embed::getIconPixmap("edit_copy"),
|
||||
tr("Copy selected notes (Ctrl+C)"), this);
|
||||
tr("Copy selected notes (%1+C)").arg(
|
||||
#ifdef LMMS_BUILD_APPLE
|
||||
"⌘"), this);
|
||||
#else
|
||||
"Ctrl"), this);
|
||||
#endif
|
||||
|
||||
QAction* pasteAction = new QAction(embed::getIconPixmap("edit_paste"),
|
||||
tr("Paste notes from clipboard (Ctrl+V)"), this);
|
||||
tr("Paste notes from clipboard (%1+V)").arg(
|
||||
#ifdef LMMS_BUILD_APPLE
|
||||
"⌘"), this);
|
||||
#else
|
||||
"Ctrl"), this);
|
||||
#endif
|
||||
|
||||
cutAction->setWhatsThis(
|
||||
tr( "Click here and the selected notes will be cut into the "
|
||||
|
||||
@@ -116,31 +116,56 @@ void ProjectNotes::setupActions()
|
||||
|
||||
a = new QAction( embed::getIconPixmap( "edit_undo" ), tr( "&Undo" ),
|
||||
this );
|
||||
a->setShortcut( tr( "Ctrl+Z" ) );
|
||||
a->setShortcut( tr( "%1+Z" ).arg(
|
||||
#ifdef LMMS_BUILD_APPLE
|
||||
"⌘") );
|
||||
#else
|
||||
"Ctrl") );
|
||||
#endif
|
||||
connect( a, SIGNAL( triggered() ), m_edit, SLOT( undo() ) );
|
||||
tb->addAction( a );
|
||||
|
||||
a = new QAction( embed::getIconPixmap( "edit_redo" ), tr( "&Redo" ),
|
||||
this );
|
||||
a->setShortcut( tr( "Ctrl+Y" ) );
|
||||
a->setShortcut( tr( "%1+Y" ).arg(
|
||||
#ifdef LMMS_BUILD_APPLE
|
||||
"⌘") );
|
||||
#else
|
||||
"Ctrl") );
|
||||
#endif
|
||||
connect( a, SIGNAL( triggered() ), m_edit, SLOT( redo() ) );
|
||||
tb->addAction( a );
|
||||
|
||||
a = new QAction( embed::getIconPixmap( "edit_copy" ), tr( "&Copy" ),
|
||||
this );
|
||||
a->setShortcut( tr( "Ctrl+C" ) );
|
||||
a->setShortcut( tr( "%1+C" ).arg(
|
||||
#ifdef LMMS_BUILD_APPLE
|
||||
"⌘") );
|
||||
#else
|
||||
"Ctrl") );
|
||||
#endif
|
||||
connect( a, SIGNAL( triggered() ), m_edit, SLOT( copy() ) );
|
||||
tb->addAction( a );
|
||||
|
||||
a = new QAction( embed::getIconPixmap( "edit_cut" ), tr( "Cu&t" ),
|
||||
this );
|
||||
a->setShortcut( tr( "Ctrl+X" ) );
|
||||
a->setShortcut( tr( "%1+X" ).arg(
|
||||
#ifdef LMMS_BUILD_APPLE
|
||||
"⌘") );
|
||||
#else
|
||||
"Ctrl") );
|
||||
#endif
|
||||
connect( a, SIGNAL( triggered() ), m_edit, SLOT( cut() ) );
|
||||
tb->addAction( a );
|
||||
|
||||
a = new QAction( embed::getIconPixmap( "edit_paste" ), tr( "&Paste" ),
|
||||
this );
|
||||
a->setShortcut( tr( "Ctrl+V" ) );
|
||||
a->setShortcut( tr( "%1+V" ).arg(
|
||||
#ifdef LMMS_BUILD_APPLE
|
||||
"⌘") );
|
||||
#else
|
||||
"Ctrl") );
|
||||
#endif
|
||||
connect( a, SIGNAL( triggered() ), m_edit, SLOT( paste() ) );
|
||||
tb->addAction( a );
|
||||
|
||||
@@ -170,14 +195,24 @@ void ProjectNotes::setupActions()
|
||||
|
||||
m_actionTextBold = new QAction( embed::getIconPixmap( "text_bold" ),
|
||||
tr( "&Bold" ), this );
|
||||
m_actionTextBold->setShortcut( tr( "Ctrl+B" ) );
|
||||
m_actionTextBold->setShortcut( tr( "%1+B" ).arg(
|
||||
#ifdef LMMS_BUILD_APPLE
|
||||
"⌘") );
|
||||
#else
|
||||
"Ctrl") );
|
||||
#endif
|
||||
m_actionTextBold->setCheckable( true );
|
||||
connect( m_actionTextBold, SIGNAL( triggered() ), this,
|
||||
SLOT( textBold() ) );
|
||||
|
||||
m_actionTextItalic = new QAction( embed::getIconPixmap( "text_italic" ),
|
||||
tr( "&Italic" ), this );
|
||||
m_actionTextItalic->setShortcut( tr( "Ctrl+I" ) );
|
||||
m_actionTextItalic->setShortcut( tr( "%1+I" ).arg(
|
||||
#ifdef LMMS_BUILD_APPLE
|
||||
"⌘") );
|
||||
#else
|
||||
"Ctrl") );
|
||||
#endif
|
||||
m_actionTextItalic->setCheckable( true );
|
||||
connect( m_actionTextItalic, SIGNAL( triggered() ), this,
|
||||
SLOT( textItalic() ) );
|
||||
@@ -185,7 +220,12 @@ void ProjectNotes::setupActions()
|
||||
m_actionTextUnderline = new QAction( embed::getIconPixmap(
|
||||
"text_under" ),
|
||||
tr( "&Underline" ), this );
|
||||
m_actionTextUnderline->setShortcut( tr( "Ctrl+U" ) );
|
||||
m_actionTextUnderline->setShortcut( tr( "%1+U" ).arg(
|
||||
#ifdef LMMS_BUILD_APPLE
|
||||
"⌘") );
|
||||
#else
|
||||
"Ctrl") );
|
||||
#endif
|
||||
m_actionTextUnderline->setCheckable( true );
|
||||
connect( m_actionTextUnderline, SIGNAL( triggered() ), this,
|
||||
SLOT( textUnderline() ) );
|
||||
@@ -197,7 +237,12 @@ void ProjectNotes::setupActions()
|
||||
|
||||
m_actionAlignLeft = new QAction( embed::getIconPixmap( "text_left" ),
|
||||
tr( "&Left" ), m_edit );
|
||||
m_actionAlignLeft->setShortcut( tr( "Ctrl+L" ) );
|
||||
m_actionAlignLeft->setShortcut( tr( "%1+L" ).arg(
|
||||
#ifdef LMMS_BUILD_APPLE
|
||||
"⌘") );
|
||||
#else
|
||||
"Ctrl") );
|
||||
#endif
|
||||
m_actionAlignLeft->setCheckable( true );
|
||||
grp->addAction( m_actionAlignLeft );
|
||||
|
||||
@@ -205,21 +250,36 @@ void ProjectNotes::setupActions()
|
||||
"text_center" ),
|
||||
tr( "C&enter" ), m_edit );
|
||||
m_actionAlignCenter->setShortcutContext( Qt::WidgetShortcut );
|
||||
m_actionAlignCenter->setShortcut( tr( "Ctrl+E" ) );
|
||||
m_actionAlignCenter->setShortcut( tr( "%1+E" ).arg(
|
||||
#ifdef LMMS_BUILD_APPLE
|
||||
"⌘") );
|
||||
#else
|
||||
"Ctrl") );
|
||||
#endif
|
||||
m_actionAlignCenter->setCheckable( true );
|
||||
grp->addAction( m_actionAlignCenter );
|
||||
|
||||
m_actionAlignRight = new QAction( embed::getIconPixmap( "text_right" ),
|
||||
tr( "&Right" ), m_edit );
|
||||
m_actionAlignRight->setShortcutContext( Qt::WidgetShortcut );
|
||||
m_actionAlignRight->setShortcut( tr( "Ctrl+R" ) );
|
||||
m_actionAlignRight->setShortcut( tr( "%1+R" ).arg(
|
||||
#ifdef LMMS_BUILD_APPLE
|
||||
"⌘") );
|
||||
#else
|
||||
"Ctrl") );
|
||||
#endif
|
||||
m_actionAlignRight->setCheckable( true );
|
||||
grp->addAction( m_actionAlignRight );
|
||||
|
||||
m_actionAlignJustify = new QAction( embed::getIconPixmap(
|
||||
"text_block" ),
|
||||
tr( "&Justify" ), m_edit );
|
||||
m_actionAlignJustify->setShortcut( tr( "Ctrl+J" ) );
|
||||
m_actionAlignJustify->setShortcut( tr( "%1+J" ).arg(
|
||||
#ifdef LMMS_BUILD_APPLE
|
||||
"⌘") );
|
||||
#else
|
||||
"Ctrl") );
|
||||
#endif
|
||||
m_actionAlignJustify->setCheckable( true );
|
||||
grp->addAction( m_actionAlignJustify );
|
||||
|
||||
@@ -409,5 +469,3 @@ void ProjectNotes::closeEvent( QCloseEvent * _ce )
|
||||
}
|
||||
_ce->ignore();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -266,7 +266,12 @@ void SampleTCOView::contextMenuEvent( QContextMenuEvent * _cme )
|
||||
tr( "Paste" ), m_tco, SLOT( paste() ) );
|
||||
contextMenu.addSeparator();
|
||||
contextMenu.addAction( embed::getIconPixmap( "muted" ),
|
||||
tr( "Mute/unmute (<Ctrl> + middle click)" ),
|
||||
tr( "Mute/unmute (<%1> + middle click)" ).arg(
|
||||
#ifdef LMMS_BUILD_APPLE
|
||||
"⌘"),
|
||||
#else
|
||||
"Ctrl"),
|
||||
#endif
|
||||
m_tco, SLOT( toggleMute() ) );
|
||||
contextMenu.addAction( embed::getIconPixmap( "record" ),
|
||||
tr( "Set/clear record" ),
|
||||
|
||||
Reference in New Issue
Block a user