summaryrefslogtreecommitdiffstats
path: root/src/gui/styles
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-02-02 18:36:11 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-02-02 18:36:11 (GMT)
commit05afad39c5d0c8e728bf3d5dd31f7ee618fcec5d (patch)
treeb5c8a7137b9e9666e2c80d4943d493d74a991a19 /src/gui/styles
parentba8892c1a833899c23703a5da1978cbfe7c92725 (diff)
parent335284df68b726bda40094c866c53547c13423d2 (diff)
downloadQt-05afad39c5d0c8e728bf3d5dd31f7ee618fcec5d.zip
Qt-05afad39c5d0c8e728bf3d5dd31f7ee618fcec5d.tar.gz
Qt-05afad39c5d0c8e728bf3d5dd31f7ee618fcec5d.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Add auto-generated tests for QScriptValue Add changes for 4.6.2 Changelog: Added Designer/uic3 changes for 4.6.2 Revert "Improve raster graphics system performance on Mac." Introduce of QScriptValue autotest generator. Fixed potential crash in mac style Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( 69dd29fbeb12d076741dce70ac6bc155101ccd6f ) Remove PrintDialog frame on Mac Fix missing non-unified toolbar margins on Mac Add a warning when there are duplicate aliases in a resource file. Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( a733444d3be6605552471f047558927495ff62b7 ) Improve raster graphics system performance on Mac. Fixed compile of framecapture, simpleselector for symbian-abld winscw.
Diffstat (limited to 'src/gui/styles')
-rw-r--r--src/gui/styles/qmacstyle_mac.mm21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm
index 7a680f2..aab16cb 100644
--- a/src/gui/styles/qmacstyle_mac.mm
+++ b/src/gui/styles/qmacstyle_mac.mm
@@ -2411,7 +2411,12 @@ int QMacStyle::pixelMetric(PixelMetric metric, const QStyleOption *opt, const QW
ret = 0;
break;
case PM_ToolBarFrameWidth:
- ret = 0;
+ ret = 1;
+ if (widget) {
+ if (QMainWindow * mainWindow = qobject_cast<QMainWindow *>(widget->parent()))
+ if (mainWindow->unifiedTitleAndToolBarOnMac())
+ ret = 0;
+ }
break;
default:
ret = QWindowsStyle::pixelMetric(metric, opt, widget);
@@ -5715,12 +5720,16 @@ QSize QMacStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt,
break;
case CT_ToolButton:
if (widget && qobject_cast<const QToolBar *>(widget->parentWidget())) {
- sz.rwidth() += 4;
- if (sz.height() <= 32) {
- // Workaround strange HIToolBar bug when getting constraints.
- sz.rheight() += 1;
+ 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;
+ }
}
- return sz;
}
sz.rwidth() += 10;
sz.rheight() += 10;