5.15.2 - fix for QTBUG-98093 (macOS: make the slider knob big enough for BigSur and Monterey, 6ff07ec23b)

This commit is contained in:
kleuter 2021-11-24 12:16:52 +01:00
parent 7deb67707f
commit adb5e94f20

View File

@ -848,6 +848,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))
@ -1042,6 +1044,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)