diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-04-08 13:19:37 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-04-10 13:59:30 +0200 |
commit | 033d01bd6e2aef740ad1408a04d3ca0ae3b9ba9b (patch) | |
tree | af2e47a222cf6f4ed3687305df2d1cc3a578b2ed /src/widgets/itemviews/qheaderview.cpp | |
parent | c0873b7832d8aaf79dda0c5c5820f97c84b399ed (diff) |
QApplication: remove obsolete globalStrut functionality
Change-Id: If56873f86f5291264cac720f8db7dbd4db756f49
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/widgets/itemviews/qheaderview.cpp')
-rw-r--r-- | src/widgets/itemviews/qheaderview.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/widgets/itemviews/qheaderview.cpp b/src/widgets/itemviews/qheaderview.cpp index 84e2fd72a9..bd79710b05 100644 --- a/src/widgets/itemviews/qheaderview.cpp +++ b/src/widgets/itemviews/qheaderview.cpp @@ -1570,8 +1570,7 @@ void QHeaderView::resetDefaultSectionSize() \brief the minimum size of the header sections. The minimum section size is the smallest section size allowed. If the - minimum section size is set to -1, QHeaderView will use the maximum of - the \l{QApplication::globalStrut()}{global strut} or the + minimum section size is set to -1, QHeaderView will use the \l{fontMetrics()}{font metrics} size. This property is honored by all \l{ResizeMode}{resize modes}. @@ -1582,11 +1581,10 @@ int QHeaderView::minimumSectionSize() const { Q_D(const QHeaderView); if (d->minimumSectionSize == -1) { - QSize strut = QApplication::globalStrut(); int margin = 2 * style()->pixelMetric(QStyle::PM_HeaderMargin, nullptr, this); if (d->orientation == Qt::Horizontal) - return qMax(strut.width(), (fontMetrics().maxWidth() + margin)); - return qMax(strut.height(), (fontMetrics().height() + margin)); + return fontMetrics().maxWidth() + margin; + return fontMetrics().height() + margin; } return d->minimumSectionSize; } |