summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-02-03 03:30:37 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-02-03 03:30:37 (GMT)
commit0d9ff247db8ca64e0dcfd0ea05c3a615abab845b (patch)
tree9029c443bfa3612a488d1432d3defb3bda380d5a /src/gui
parenta4ac042461bdb019433aa4e2d04a6be1c5f29591 (diff)
parent9647dfb6d363812c59bd7ffb2a6c4ee2a34035ce (diff)
downloadQt-0d9ff247db8ca64e0dcfd0ea05c3a615abab845b.zip
Qt-0d9ff247db8ca64e0dcfd0ea05c3a615abab845b.tar.gz
Qt-0d9ff247db8ca64e0dcfd0ea05c3a615abab845b.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: Fix license headers on these new files (and the generator). 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')
-rw-r--r--src/gui/styles/qmacstyle_mac.mm21
-rw-r--r--src/gui/widgets/qprintpreviewwidget.cpp6
2 files changed, 20 insertions, 7 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;
diff --git a/src/gui/widgets/qprintpreviewwidget.cpp b/src/gui/widgets/qprintpreviewwidget.cpp
index 747a227..45b15ef 100644
--- a/src/gui/widgets/qprintpreviewwidget.cpp
+++ b/src/gui/widgets/qprintpreviewwidget.cpp
@@ -151,7 +151,11 @@ class GraphicsView : public QGraphicsView
public:
GraphicsView(QWidget* parent = 0)
: QGraphicsView(parent)
- {}
+ {
+#ifdef Q_WS_MAC
+ setFrameStyle(QFrame::NoFrame);
+#endif
+ }
signals:
void resized();