Skip to content

Commit

Permalink
[gui] keep dock icons one size smaller than toolbar icons
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed May 29, 2015
1 parent 7db5272 commit ee6948d
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/app/qgisappstylesheet.cpp
Expand Up @@ -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 ) );
Expand Down

0 comments on commit ee6948d

Please sign in to comment.