mirror of
https://github.com/crystalidea/qt-build-tools.git
synced 2024-11-25 20:27:35 +08:00
5.15.2 - fix for QTBUG-98093 (macOS: make the slider knob big enough for BigSur and Monterey, 6ff07ec23b
)
This commit is contained in:
parent
7deb67707f
commit
adb5e94f20
@ -848,6 +848,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))
|
||||||
@ -1042,6 +1044,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