summaryrefslogtreecommitdiffstats
path: root/src/gui/styles
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@nokia.com>2010-02-05 13:23:54 (GMT)
committerPaul Olav Tvete <paul.tvete@nokia.com>2010-02-05 13:23:54 (GMT)
commitf8fa846bdcd961105674aba3666240b6ed166b04 (patch)
treeef2effa1ae84ba43a6bfc06651ba3fe2bf61d8b7 /src/gui/styles
parentf9c314aa306bfd4a237594775a8aeb14c858e66d (diff)
parentb5a5c7ce06291d4f9cae15383bd35677db277138 (diff)
downloadQt-f8fa846bdcd961105674aba3666240b6ed166b04.zip
Qt-f8fa846bdcd961105674aba3666240b6ed166b04.tar.gz
Qt-f8fa846bdcd961105674aba3666240b6ed166b04.tar.bz2
Merge remote branch 'origin/4.6' into 4.6
Conflicts: dist/changes-4.6.2
Diffstat (limited to 'src/gui/styles')
-rw-r--r--src/gui/styles/qmacstyle_mac.mm10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm
index aab16cb..78074c7 100644
--- a/src/gui/styles/qmacstyle_mac.mm
+++ b/src/gui/styles/qmacstyle_mac.mm
@@ -3380,8 +3380,14 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
if (tb->toolButtonStyle != Qt::ToolButtonIconOnly) {
needText = true;
if (tb->toolButtonStyle == Qt::ToolButtonTextUnderIcon) {
- pr.setHeight(pixmap.size().height());
- cr.adjust(0, pr.bottom() + 1, 0, 1);
+ QMainWindow *mw = qobject_cast<QMainWindow *>(w->window());
+ if (mw && mw->unifiedTitleAndToolBarOnMac()) {
+ pr.setHeight(pixmap.size().height());
+ cr.adjust(0, pr.bottom() + 1, 0, 1);
+ } else {
+ pr.setHeight(pixmap.size().height() + 6);
+ cr.adjust(0, pr.bottom(), 0, -3);
+ }
alignment |= Qt::AlignCenter;
} else {
pr.setWidth(pixmap.width() + 8);