diff --git a/src/app/qgisappstylesheet.cpp b/src/app/qgisappstylesheet.cpp index 0233d980a50..bde4b50d85d 100644 --- a/src/app/qgisappstylesheet.cpp +++ b/src/app/qgisappstylesheet.cpp @@ -176,9 +176,21 @@ void QgisAppStyleSheet::buildStyleSheet( const QMap& opts ) .arg( palette.highlight().color().name() ) .arg( palette.highlightedText().color().name() ); - QString iconSize = opts.value( "iconSize" ).toString(); + int iconSize = opts.value( "iconSize" ).toInt(); + if ( iconSize > 32 ) + { + iconSize -= 16; + } + else if ( iconSize == 32 ) + { + iconSize = 24; + } + else + { + iconSize = 16; + } + QgsDebugMsg( QString( "iconSize: %1" ).arg( iconSize ) ); - if ( iconSize.isEmpty() ) { return; } ss += QString( "QDockWidget QToolButton { icon-size: %1px; }" ).arg( iconSize ); QgsDebugMsg( QString( "Stylesheet built: %1" ).arg( ss ) );