Skip to content

Commit

Permalink
Fix size of columns in items dock on hidpi screens
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Oct 6, 2017
1 parent 1d622e5 commit afd9d23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/layout/qgslayoutdesignerdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -536,8 +536,8 @@ void QgsLayoutDesignerDialog::setCurrentLayout( QgsLayout *layout )
#endif
mItemsTreeView->header()->setSectionResizeMode( 0, QHeaderView::Fixed );
mItemsTreeView->header()->setSectionResizeMode( 1, QHeaderView::Fixed );
mItemsTreeView->setColumnWidth( 0, 30 );
mItemsTreeView->setColumnWidth( 1, 30 );
mItemsTreeView->setColumnWidth( 0, Qgis::UI_SCALE_FACTOR * fontMetrics().width( QStringLiteral( "xxxx" ) ) );
mItemsTreeView->setColumnWidth( 1, Qgis::UI_SCALE_FACTOR * fontMetrics().width( QStringLiteral( "xxxx" ) ) );
mItemsTreeView->header()->setSectionsMovable( false );

connect( mItemsTreeView->selectionModel(), &QItemSelectionModel::currentChanged, mLayout->itemsModel(), &QgsLayoutModel::setSelected );
Expand Down

0 comments on commit afd9d23

Please sign in to comment.