Skip to content

Commit

Permalink
move the iconsize setting into the qgis group, part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Jan 16, 2018
1 parent fe2292c commit fa120b5
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/app/layout/qgslayoutdesignerdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ QgsLayoutDesignerDialog::QgsLayoutDesignerDialog( QWidget *parent, Qt::WindowFla
initializeRegistry();
}
QgsSettings settings;
int size = settings.value( QStringLiteral( "IconSize" ), QGIS_ICON_SIZE ).toInt();
int size = settings.value( QStringLiteral( "/qgis/iconSize" ), QGIS_ICON_SIZE ).toInt();
setIconSize( QSize( size, size ) );
setStyleSheet( QgisApp::instance()->styleSheet() );

Expand Down
8 changes: 4 additions & 4 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1094,9 +1094,9 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
}

// Set icon size of toolbars
if ( settings.contains( QStringLiteral( "IconSize" ) ) )
if ( settings.contains( QStringLiteral( "/qgis/iconSize" ) ) )
{
int size = settings.value( QStringLiteral( "IconSize" ) ).toInt();
int size = settings.value( QStringLiteral( "/qgis/iconSize" ) ).toInt();
if ( size < 16 )
size = QGIS_ICON_SIZE;
setIconSizes( size );
Expand All @@ -1105,7 +1105,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
{
// first run, guess a good icon size
int size = chooseReasonableDefaultIconSize();
settings.setValue( QStringLiteral( "IconSize" ), size );
settings.setValue( QStringLiteral( "/qgis/iconSize" ), size );
setIconSizes( size );
}

Expand Down Expand Up @@ -9967,7 +9967,7 @@ QgsMapLayer *QgisApp::activeLayer()
QSize QgisApp::iconSize( bool dockedToolbar ) const
{
QgsSettings s;
int size = s.value( QStringLiteral( "/IconSize" ), 32 ).toInt();
int size = s.value( QStringLiteral( "/qgis/iconSize" ), 32 ).toInt();

if ( dockedToolbar )
{
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgisappstylesheet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ QMap<QString, QVariant> QgisAppStyleSheet::defaultOptions()

settings.endGroup(); // "qgis/stylesheet"

opts.insert( QStringLiteral( "iconSize" ), settings.value( QStringLiteral( "IconSize" ), QGIS_ICON_SIZE ) );
opts.insert( QStringLiteral( "iconSize" ), settings.value( QStringLiteral( "/qgis/iconSize" ), QGIS_ICON_SIZE ) );

return opts;
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsattributetabledialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ QgsAttributeTableDialog::QgsAttributeTableDialog( QgsVectorLayer *layer, QgsAttr

QgsSettings settings;

int size = settings.value( QStringLiteral( "IconSize" ), 16 ).toInt();
int size = settings.value( QStringLiteral( "/qgis/iconSize" ), 16 ).toInt();
if ( size > 32 )
{
size -= 16;
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsidentifyresultsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ QgsIdentifyResultsDialog::QgsIdentifyResultsDialog( QgsMapCanvas *canvas, QWidge
else
QgisApp::instance()->panelMenu()->addAction( mDock->toggleViewAction() );

int size = mySettings.value( QStringLiteral( "IconSize" ), 16 ).toInt();
int size = mySettings.value( QStringLiteral( "/qgis/iconSize" ), 16 ).toInt();
if ( size > 32 )
{
size -= 16;
Expand Down

0 comments on commit fa120b5

Please sign in to comment.