File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -1065,14 +1065,25 @@ void QgsLayoutDesignerDialog::setCurrentLayout( QgsLayout *layout )
1065
1065
1066
1066
void QgsLayoutDesignerDialog::setIconSizes ( int size )
1067
1067
{
1068
+ QSize iconSize = QSize ( size, size );
1069
+ QSize panelIconSize = QgsGuiUtils::panelIconSize ( iconSize );
1070
+
1068
1071
// Set the icon size of for all the toolbars created in the future.
1069
- setIconSize ( QSize ( size, size ) );
1072
+ setIconSize ( iconSize );
1070
1073
1071
1074
// Change all current icon sizes.
1072
1075
QList<QToolBar *> toolbars = findChildren<QToolBar *>();
1073
1076
Q_FOREACH ( QToolBar *toolbar, toolbars )
1074
1077
{
1075
- toolbar->setIconSize ( QSize ( size, size ) );
1078
+ QString className = toolbar->parent ()->metaObject ()->className ();
1079
+ if ( className == QLatin1String ( " QgsLayoutDesignerDialog" ) )
1080
+ {
1081
+ toolbar->setIconSize ( iconSize );
1082
+ }
1083
+ else
1084
+ {
1085
+ toolbar->setIconSize ( panelIconSize );
1086
+ }
1076
1087
}
1077
1088
}
1078
1089
Original file line number Diff line number Diff line change 31
31
#include " qgslayoutundostack.h"
32
32
#include " qgslayoutatlas.h"
33
33
#include " qgslayoutdesignerinterface.h"
34
+ #include " qgsguiutils.h"
35
+
34
36
#include < QMenu>
35
37
#include < QMessageBox>
36
38
@@ -86,7 +88,7 @@ QgsLayoutMapWidget::QgsLayoutMapWidget( QgsLayoutItemMap *item )
86
88
setPanelTitle ( tr ( " Map Properties" ) );
87
89
mMapRotationSpinBox ->setClearValue ( 0 );
88
90
89
- mDockToolbar ->setIconSize ( QgisApp::instance ()-> iconSize ( true ) );
91
+ mDockToolbar ->setIconSize ( QgsGuiUtils:: iconSize ( true ) );
90
92
91
93
// add widget for general composer item properties
92
94
mItemPropertiesWidget = new QgsLayoutItemPropertiesWidget ( this , item );
You can’t perform that action at this time.
0 commit comments