Skip to content
Permalink
Browse files

move the iconsize setting into the qgis group, part 2

  • Loading branch information
nirvn committed Jan 16, 2018
1 parent fe2292c commit fa120b5309a697b37d92b9bbf8cc08d6a071c40a
@@ -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() );

@@ -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 );
@@ -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 );
}

@@ -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 )
{
@@ -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;
}
@@ -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;
@@ -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;

0 comments on commit fa120b5

Please sign in to comment.
You can’t perform that action at this time.