Skip to content
Permalink
Browse files
[gui] keep dock icons one size smaller than toolbar icons
  • Loading branch information
nirvn committed May 29, 2015
1 parent 7db5272 commit ee6948d3d486be684285782c95710628b14e9510
Showing with 14 additions and 2 deletions.
  1. +14 −2 src/app/qgisappstylesheet.cpp
@@ -176,9 +176,21 @@ void QgisAppStyleSheet::buildStyleSheet( const QMap<QString, QVariant>& 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 ) );

0 comments on commit ee6948d

Please sign in to comment.