mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-16 00:03:12 -04:00
Merge pull request #2091 from nirvn/fix_tool_button_size
[GUI] Keep dock icons one size smaller than toolbar icons
This commit is contained in:
commit
04388f73c6
@ -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 ) );
|
||||
|
@ -33,10 +33,10 @@
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QToolButton" name="mBtnRefresh">
|
||||
|
Loading…
x
Reference in New Issue
Block a user