summaryrefslogtreecommitdiff
path: root/src/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/styles/qmacstyle_mac.mm27
1 files changed, 2 insertions, 25 deletions
diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm
index 8c00f06a4f..d13339b555 100644
--- a/src/widgets/styles/qmacstyle_mac.mm
+++ b/src/widgets/styles/qmacstyle_mac.mm
@@ -2437,11 +2437,6 @@ int QMacStyle::pixelMetric(PixelMetric metric, const QStyleOption *opt, const QW
break;
case PM_ToolBarFrameWidth:
ret = 1;
- if (widget) {
- if (QMainWindow * mainWindow = qobject_cast<QMainWindow *>(widget->parent()))
- if (mainWindow->unifiedTitleAndToolBarOnMac())
- ret = 0;
- }
break;
case PM_ScrollView_ScrollBarOverlap:
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
@@ -3445,14 +3440,8 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
if (tb->toolButtonStyle != Qt::ToolButtonIconOnly) {
needText = true;
if (tb->toolButtonStyle == Qt::ToolButtonTextUnderIcon) {
- QMainWindow *mw = w ? qobject_cast<QMainWindow *>(w->window()) : 0;
- if (mw && mw->unifiedTitleAndToolBarOnMac()) {
- pr.setHeight(pixmap.size().height() / pixmap.devicePixelRatio());
- cr.adjust(0, pr.bottom() + 1, 0, 1);
- } else {
- pr.setHeight(pixmap.size().height() / pixmap.devicePixelRatio() + 6);
- cr.adjust(0, pr.bottom(), 0, -3);
- }
+ pr.setHeight(pixmap.size().height() / pixmap.devicePixelRatio() + 6);
+ cr.adjust(0, pr.bottom(), 0, -3);
alignment |= Qt::AlignCenter;
} else {
pr.setWidth(pixmap.width() / pixmap.devicePixelRatio() + 8);
@@ -6271,18 +6260,6 @@ QSize QMacStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt,
}
break;
case CT_ToolButton:
- if (widget && qobject_cast<const QToolBar *>(widget->parentWidget())) {
- if (QMainWindow * mainWindow = qobject_cast<QMainWindow *>(widget->parent())) {
- if (mainWindow->unifiedTitleAndToolBarOnMac()) {
- sz.rwidth() += 4;
- if (sz.height() <= 32) {
- // Workaround strange HIToolBar bug when getting constraints.
- sz.rheight() += 1;
- }
- return sz;
- }
- }
- }
sz.rwidth() += 10;
sz.rheight() += 10;
return sz;