From 330ff722756890d3c7714084b09054c928c83b0c Mon Sep 17 00:00:00 2001 From: kleuter Date: Tue, 23 Nov 2021 16:47:03 +0100 Subject: [PATCH] 5.15.7 - fix for QTBUG-98093 (make the slider knob big enough for BigSur and Monterey, backport of https://github.com/qt/qtbase/commit/6ff07ec23b562d78f7fa19b5c6ada72724dc81a1) --- 5.15.7/qtbase/src/plugins/styles/mac/qmacstyle_mac.mm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/5.15.7/qtbase/src/plugins/styles/mac/qmacstyle_mac.mm b/5.15.7/qtbase/src/plugins/styles/mac/qmacstyle_mac.mm index 4b0514b..01a55a7 100644 --- a/5.15.7/qtbase/src/plugins/styles/mac/qmacstyle_mac.mm +++ b/5.15.7/qtbase/src/plugins/styles/mac/qmacstyle_mac.mm @@ -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(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)