Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Make locator bar shortcut hint show Cmd-K on MacOS (#4583)
- Loading branch information
Showing
with
4 additions
and
0 deletions.
-
+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 ) ); |
|
|