Skip to content

Commit

Permalink
Fix some suffixes for spin boxes
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Mar 16, 2017
1 parent b0dc9f8 commit 47a7113
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2556,6 +2556,7 @@ void QgisApp::createStatusBar()
mRotationEdit->setWrapping( true );
mRotationEdit->setSingleStep( 5.0 );
mRotationEdit->setFont( myFont );
mRotationEdit->setSuffix( trUtf8( " °" ) );
mRotationEdit->setWhatsThis( tr( "Shows the current map clockwise rotation "
"in degrees. It also allows editing to set "
"the rotation" ) );
Expand Down
3 changes: 2 additions & 1 deletion src/app/qgsmapcanvasdockwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@ QgsMapSettingsAction::QgsMapSettingsAction( QWidget *parent )
mRotationWidget->setRange( -180.0, 180.0 );
mRotationWidget->setWrapping( true );
mRotationWidget->setSingleStep( 5.0 );
mRotationWidget->setSuffix( trUtf8( " °" ) );
mRotationWidget->setToolTip( tr( "Current clockwise map rotation in degrees" ) );

label = new QLabel( tr( "Rotation" ) );
Expand Down Expand Up @@ -441,7 +442,7 @@ QgsMapSettingsAction::QgsMapSettingsAction( QWidget *parent )
gLayout->addWidget( mSyncScaleCheckBox, 3, 0, 1, 2 );

mScaleFactorWidget = new QgsDoubleSpinBox();
mScaleFactorWidget->setSuffix( QStringLiteral( "×" ) );
mScaleFactorWidget->setSuffix( trUtf8( "×" ) );
mScaleFactorWidget->setDecimals( 2 );
mScaleFactorWidget->setRange( 0.01, 100000 );
mScaleFactorWidget->setWrapping( false );
Expand Down

1 comment on commit 47a7113

@m-kuhn
Copy link
Member

@m-kuhn m-kuhn commented on 47a7113 Mar 16, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nyalldawson these kind of small patches make life easier.
I was wondering about the spacing, did you add that based on some reference? Reading a random source from the internet (# 15) it looks like ° shouldn't receive a space?

Please sign in to comment.