From adb5e94f2040bc47d81b88c5c465598c655cc6f5 Mon Sep 17 00:00:00 2001 From: kleuter Date: Wed, 24 Nov 2021 12:16:52 +0100 Subject: [PATCH] 5.15.2 - fix for QTBUG-98093 (macOS: make the slider knob big enough for BigSur and Monterey, https://github.com/qt/qtbase/commit/6ff07ec23b562d78f7fa19b5c6ada72724dc81a1) --- 5.15.2/qtbase/src/plugins/styles/mac/qmacstyle_mac.mm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/5.15.2/qtbase/src/plugins/styles/mac/qmacstyle_mac.mm b/5.15.2/qtbase/src/plugins/styles/mac/qmacstyle_mac.mm index d21c276..1038be8 100644 --- a/5.15.2/qtbase/src/plugins/styles/mac/qmacstyle_mac.mm +++ b/5.15.2/qtbase/src/plugins/styles/mac/qmacstyle_mac.mm @@ -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(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)