Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Avoid clipped svg icons in svg selector widgets
  • Loading branch information
nyalldawson committed Dec 14, 2020
1 parent f83a157 commit 55f5259
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/gui/layout/qgslayoutpicturewidget.cpp
Expand Up @@ -98,6 +98,7 @@ QgsLayoutPictureWidget::QgsLayoutPictureWidget( QgsLayoutItemPicture *picture )
mIconSize = std::max( 30, static_cast< int >( std::round( Qgis::UI_SCALE_FACTOR * fontMetrics().horizontalAdvance( 'X' ) * 4 ) ) );
#endif
viewImages->setGridSize( QSize( mIconSize * 1.2, mIconSize * 1.2 ) );
viewImages->setUniformItemSizes( false );
populateList();

connect( viewImages->selectionModel(), &QItemSelectionModel::currentChanged, this, &QgsLayoutPictureWidget::setSvgName );
Expand Down
1 change: 1 addition & 0 deletions src/gui/symbology/qgssvgselectorwidget.cpp
Expand Up @@ -391,6 +391,7 @@ QgsSvgSelectorWidget::QgsSvgSelectorWidget( QWidget *parent )
mIconSize = std::max( 30, static_cast< int >( std::round( Qgis::UI_SCALE_FACTOR * fontMetrics().horizontalAdvance( 'X' ) * 3 ) ) );
#endif
mImagesListView->setGridSize( QSize( mIconSize * 1.2, mIconSize * 1.2 ) );
mImagesListView->setUniformItemSizes( false );

mGroupsTreeView->setHeaderHidden( true );
populateList();
Expand Down

0 comments on commit 55f5259

Please sign in to comment.