Skip to content
Permalink
Browse files

[ui] Fix layout designer panel icon (re)sizing

  • Loading branch information
nirvn committed Apr 17, 2019
1 parent d87c0a2 commit 62a5bc422cd78f91f6b89e03e6aea11768d73f91
Showing with 16 additions and 3 deletions.
  1. +13 −2 src/app/layout/qgslayoutdesignerdialog.cpp
  2. +3 −1 src/app/layout/qgslayoutmapwidget.cpp
@@ -1065,14 +1065,25 @@ void QgsLayoutDesignerDialog::setCurrentLayout( QgsLayout *layout )

void QgsLayoutDesignerDialog::setIconSizes( int size )
{
QSize iconSize = QSize( size, size );
QSize panelIconSize = QgsGuiUtils::panelIconSize( iconSize );

//Set the icon size of for all the toolbars created in the future.
setIconSize( QSize( size, size ) );
setIconSize( iconSize );

//Change all current icon sizes.
QList<QToolBar *> toolbars = findChildren<QToolBar *>();
Q_FOREACH ( QToolBar *toolbar, toolbars )
{
toolbar->setIconSize( QSize( size, size ) );
QString className = toolbar->parent()->metaObject()->className();
if ( className == QLatin1String( "QgsLayoutDesignerDialog" ) )
{
toolbar->setIconSize( iconSize );
}
else
{
toolbar->setIconSize( panelIconSize );
}
}
}

@@ -31,6 +31,8 @@
#include "qgslayoutundostack.h"
#include "qgslayoutatlas.h"
#include "qgslayoutdesignerinterface.h"
#include "qgsguiutils.h"

#include <QMenu>
#include <QMessageBox>

@@ -86,7 +88,7 @@ QgsLayoutMapWidget::QgsLayoutMapWidget( QgsLayoutItemMap *item )
setPanelTitle( tr( "Map Properties" ) );
mMapRotationSpinBox->setClearValue( 0 );

mDockToolbar->setIconSize( QgisApp::instance()->iconSize( true ) );
mDockToolbar->setIconSize( QgsGuiUtils::iconSize( true ) );

//add widget for general composer item properties
mItemPropertiesWidget = new QgsLayoutItemPropertiesWidget( this, item );

0 comments on commit 62a5bc4

Please sign in to comment.
You can’t perform that action at this time.