summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qmacstyle_mac.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/styles/qmacstyle_mac.mm')
-rw-r--r--src/widgets/styles/qmacstyle_mac.mm11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm
index bb9230804c..00356b7468 100644
--- a/src/widgets/styles/qmacstyle_mac.mm
+++ b/src/widgets/styles/qmacstyle_mac.mm
@@ -586,11 +586,9 @@ CGColorSpaceRef qt_mac_genericColorSpace()
{
#if 0
if (!m_genericColorSpace) {
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_4) {
m_genericColorSpace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB);
} else
-#endif
{
m_genericColorSpace = CGColorSpaceCreateDeviceRGB();
}
@@ -4913,14 +4911,12 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex
} else {
if (!(slider->subControls & SC_SliderHandle))
tdi.attributes &= ~kThemeTrackShowThumb;
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
if (!(slider->subControls & SC_SliderGroove))
tdi.attributes |= kThemeTrackHideTrack;
-#endif
}
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
- if (cc == CC_ScrollBar && proxy()->styleHint(SH_ScrollBar_Transient, 0, widget)) {
+ if (cc == CC_ScrollBar && proxy()->styleHint(SH_ScrollBar_Transient, opt, widget)) {
bool wasActive = false;
CGFloat opacity = 1.0;
CGFloat expandScale = 1.0;
@@ -5986,10 +5982,11 @@ QSize QMacStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt,
switch (ct) {
case QStyle::CT_SpinBox:
- // hack to work around horrible sizeHint() code in QAbstractSpinBox
+ // hack to work around horrible sizeHint() code in QAbstractSpinBox
+ sz = QCommonStyle::sizeFromContents(ct, opt, csz, widget);
sz.setHeight(sz.height() - 3);
break;
- case QStyle::CT_TabWidget:
+ case QStyle::CT_TabWidget:
// the size between the pane and the "contentsRect" (+4,+4)
// (the "contentsRect" is on the inside of the pane)
sz = QCommonStyle::sizeFromContents(ct, opt, csz, widget);