mirror of
https://github.com/crystalidea/qt-build-tools.git
synced 2024-11-26 04:31:39 +08:00
5.15.7 - fix for QTBUG-98093 (make the slider knob big enough for BigSur and Monterey, backport of 6ff07ec23b
)
This commit is contained in:
parent
4117ef5166
commit
330ff72275
@ -844,6 +844,8 @@ static QSize qt_aqua_get_known_size(QStyle::ContentsType ct, const QWidget *widg
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const bool isBigSurOrAbove = QOperatingSystemVersion::current() >= QOperatingSystemVersion::MacOSBigSur;
|
||||||
|
|
||||||
if (ct == QStyle::CT_CustomBase && widg) {
|
if (ct == QStyle::CT_CustomBase && widg) {
|
||||||
#if QT_CONFIG(pushbutton)
|
#if QT_CONFIG(pushbutton)
|
||||||
if (qobject_cast<const QPushButton *>(widg))
|
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);
|
w = qt_mac_aqua_get_metric(HSliderHeight);
|
||||||
if (sld->tickPosition() != QSlider::NoTicks)
|
if (sld->tickPosition() != QSlider::NoTicks)
|
||||||
w += qt_mac_aqua_get_metric(HSliderTickHeight);
|
w += qt_mac_aqua_get_metric(HSliderTickHeight);
|
||||||
|
else if (isBigSurOrAbove)
|
||||||
|
w += 3;
|
||||||
} else {
|
} else {
|
||||||
w = qt_mac_aqua_get_metric(VSliderWidth);
|
w = qt_mac_aqua_get_metric(VSliderWidth);
|
||||||
if (sld->tickPosition() != QSlider::NoTicks)
|
if (sld->tickPosition() != QSlider::NoTicks)
|
||||||
|
Loading…
Reference in New Issue
Block a user