5.15.8 - fix for QTBUG-98093 (make the slider knob big enough for BigSur and Monterey, backport of 6ff07ec23b)

This commit is contained in:
kleuter 2022-02-18 13:52:07 +01:00
parent 0f4c0d9f47
commit 14cb2bbefd

View File

@ -844,6 +844,8 @@ static QSize qt_aqua_get_known_size(QStyle::ContentsType ct, const QWidget *widg
return ret;
}
const bool isBigSurOrAbove = QOperatingSystemVersion::current() >= QOperatingSystemVersion::MacOSBigSur;
if (ct == QStyle::CT_CustomBase && widg) {
#if QT_CONFIG(pushbutton)
if (qobject_cast<const QPushButton *>(widg))
@ -1038,6 +1040,8 @@ static QSize qt_aqua_get_known_size(QStyle::ContentsType ct, const QWidget *widg
w = qt_mac_aqua_get_metric(HSliderHeight);
if (sld->tickPosition() != QSlider::NoTicks)
w += qt_mac_aqua_get_metric(HSliderTickHeight);
else if (isBigSurOrAbove)
w += 3;
} else {
w = qt_mac_aqua_get_metric(VSliderWidth);
if (sld->tickPosition() != QSlider::NoTicks)