mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
[gui] keep dock icons one size smaller than toolbar icons
This commit is contained in:
parent
7db5272f31
commit
ee6948d3d4
@ -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 ) );
|
||||
|
Loading…
x
Reference in New Issue
Block a user