Skip to content
Permalink
Browse files
Make locator bar shortcut hint show Cmd-K on MacOS (#4583)
  • Loading branch information
timlinux authored and nyalldawson committed May 18, 2017
1 parent 8997231 commit 43a0938e96df105548fe70f544849f8612adabdf
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/gui/locator/qgslocatorwidget.cpp
@@ -34,7 +34,11 @@ QgsLocatorWidget::QgsLocatorWidget( QWidget *parent )
, mResultsView( new QgsLocatorResultsView( this ) )
{
mLineEdit->setShowClearButton( true );
#ifdef Q_OS_MACX
mLineEdit->setPlaceholderText( trUtf8( "Type to locate (⌘K)" ) );
#elif
mLineEdit->setPlaceholderText( tr( "Type to locate (Ctrl+K)" ) );
#endif

int placeholderMinWidth = mLineEdit->fontMetrics().width( mLineEdit->placeholderText() );
int minWidth = qMax( 200, ( int )( placeholderMinWidth * 1.3 ) );

0 comments on commit 43a0938

Please sign in to comment.