summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Bache-Wiig <jbache@trolltech.com>2009-10-07 16:29:46 (GMT)
committerJens Bache-Wiig <jbache@trolltech.com>2009-10-07 16:29:46 (GMT)
commit5eb2f63acda335aaf06e302ee4564259bc60222a (patch)
treed2e867a9c355a2fbe67dc26c48cea3d81e3d1f41
parentdbaa856d4d20840394baf8f4c9abf78051a6693a (diff)
downloadQt-5eb2f63acda335aaf06e302ee4564259bc60222a.zip
Qt-5eb2f63acda335aaf06e302ee4564259bc60222a.tar.gz
Qt-5eb2f63acda335aaf06e302ee4564259bc60222a.tar.bz2
Fix a combobox autotest on Vista
The subcontrol rect offset was correctly reporting not to work on Vista style. The problem was that we were getting the size of the arrow by subtracting the xoffset. But this would mean that the Reviewed-by: ogoffart
-rw-r--r--src/gui/styles/qwindowsvistastyle.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/styles/qwindowsvistastyle.cpp b/src/gui/styles/qwindowsvistastyle.cpp
index 6cb8b40..974bce1 100644
--- a/src/gui/styles/qwindowsvistastyle.cpp
+++ b/src/gui/styles/qwindowsvistastyle.cpp
@@ -2217,14 +2217,15 @@ QRect QWindowsVistaStyle::subControlRect(ComplexControl control, const QStyleOpt
int xpos = x;
int margin = cb->frame ? 3 : 0;
int bmarg = cb->frame ? 2 : 0;
- xpos += wi - bmarg - 16;
+ int arrowButtonWidth = bmarg + 16;
+ xpos += wi - arrowButtonWidth;
switch (subControl) {
case SC_ComboBoxFrame:
rect = cb->rect;
break;
case SC_ComboBoxArrow:
- rect.setRect(xpos, y , wi - xpos, he);
+ rect.setRect(xpos, y , arrowButtonWidth, he);
break;
case SC_ComboBoxEditField:
rect.setRect(x + margin, y + margin, wi - 2 * margin - 16, he - 2 * margin);