summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-11-19 11:16:45 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-11-24 13:42:13 (GMT)
commitf31d0e45952276f3de9c049c84a0ea52ce370e7f (patch)
treeaf80a3db435935018afa1bc8b7965d589fe7269d /src/gui
parentfc835ea41dffaa7ac6247c2d0d602aadf0e0f09b (diff)
downloadQt-f31d0e45952276f3de9c049c84a0ea52ce370e7f.zip
Qt-f31d0e45952276f3de9c049c84a0ea52ce370e7f.tar.gz
Qt-f31d0e45952276f3de9c049c84a0ea52ce370e7f.tar.bz2
Mac: Fixes broken window decorations for QGraphicsProxyWidget.
The problem was the QMacStyle didn't handle the pixel metric for PM_TitleBarHeight correctly when passing a style option containing an unitialized rect (empty rect). It already had special logic for invalid rects, so the fix is simply to extend the check to also handle empty rects. Auto-test included. Task-number: QTBUG-4160 Reviewed-by: msorvig
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/styles/qmacstyle_mac.mm4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm
index 38c3feb..51c2a96 100644
--- a/src/gui/styles/qmacstyle_mac.mm
+++ b/src/gui/styles/qmacstyle_mac.mm
@@ -2155,9 +2155,9 @@ int QMacStyle::pixelMetric(PixelMetric metric, const QStyleOption *opt, const QW
wdi.titleWidth = tb->rect.width();
QCFType<HIShapeRef> region;
HIRect hirect = qt_hirectForQRect(tb->rect);
- if (hirect.size.width == -1)
+ if (hirect.size.width <= 0)
hirect.size.width = 100;
- if (hirect.size.height == -1)
+ if (hirect.size.height <= 0)
hirect.size.height = 30;
HIThemeGetWindowShape(&hirect, &wdi, kWindowTitleBarRgn, &region);