File tree 2 files changed +16
-3
lines changed
2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -1078,15 +1078,26 @@ void QgsLayoutDesignerDialog::setCurrentLayout( QgsLayout *layout )
1078
1078
1079
1079
void QgsLayoutDesignerDialog::setIconSizes ( int size )
1080
1080
{
1081
+ QSize iconSize = QSize ( size, size );
1082
+ QSize panelIconSize = QgsGuiUtils::panelIconSize ( iconSize );
1083
+
1081
1084
// Set the icon size of for all the toolbars created in the future.
1082
- setIconSize ( QSize ( size, size ) );
1085
+ setIconSize ( iconSize );
1083
1086
1084
1087
// Change all current icon sizes.
1085
1088
QList<QToolBar *> toolbars = findChildren<QToolBar *>();
1086
1089
const auto constToolbars = toolbars;
1087
1090
for ( QToolBar *toolbar : constToolbars )
1088
1091
{
1089
- toolbar->setIconSize ( QSize ( size, size ) );
1092
+ QString className = toolbar->parent ()->metaObject ()->className ();
1093
+ if ( className == QLatin1String ( " QgsLayoutDesignerDialog" ) )
1094
+ {
1095
+ toolbar->setIconSize ( iconSize );
1096
+ }
1097
+ else
1098
+ {
1099
+ toolbar->setIconSize ( panelIconSize );
1100
+ }
1090
1101
}
1091
1102
}
1092
1103
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