diff options
author | Jens Bache-Wiig <jens.bache-wiig@nokia.com> | 2009-06-23 11:29:52 (GMT) |
---|---|---|
committer | Jens Bache-Wiig <jens.bache-wiig@nokia.com> | 2009-06-23 11:56:22 (GMT) |
commit | 0ba6a795f786dc19486551fed2344f394b144a08 (patch) | |
tree | d5b9bd6b2f6da498434b0d2bbd26a04554244e6f /src/gui | |
parent | 41bb0042b3d407e38e705a2d4d2147aaac8198a6 (diff) | |
download | Qt-0ba6a795f786dc19486551fed2344f394b144a08.zip Qt-0ba6a795f786dc19486551fed2344f394b144a08.tar.gz Qt-0ba6a795f786dc19486551fed2344f394b144a08.tar.bz2 |
Fix option rect offset for QComboBox on Vista style
Task-number: 254805
Reviewed-by: prasanth
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/styles/qwindowsvistastyle.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/styles/qwindowsvistastyle.cpp b/src/gui/styles/qwindowsvistastyle.cpp index 283c37a..7a75a7d 100644 --- a/src/gui/styles/qwindowsvistastyle.cpp +++ b/src/gui/styles/qwindowsvistastyle.cpp @@ -1047,7 +1047,8 @@ void QWindowsVistaStyle::drawControl(ControlElement element, const QStyleOption QRect ir = subElementRect(SE_PushButtonContents, option, 0); QStyleOptionButton newBtn = *btn; newBtn.rect = QStyle::visualRect(option->direction, option->rect, - QRect(ir.right() - mbiw - 2, (option->rect.height()/2) - (mbih/2), + QRect(ir.right() - mbiw - 2, + option->rect.top() + (option->rect.height()/2) - (mbih/2), mbiw + 1, mbih + 1)); proxy()->drawPrimitive(PE_IndicatorArrowDown, &newBtn, painter, widget); } @@ -1655,7 +1656,7 @@ void QWindowsVistaStyle::drawComplexControl(ComplexControl control, const QStyle if (sub & SC_ComboBoxArrow) { QRect subRect = proxy()->subControlRect(CC_ComboBox, option, SC_ComboBoxArrow, widget); XPThemeData theme(widget, painter, QLatin1String("COMBOBOX")); - theme.rect = proxy()->subControlRect(CC_ComboBox, option, SC_ComboBoxArrow, widget); + theme.rect = subRect; partId = option->direction == Qt::RightToLeft ? CP_DROPDOWNBUTTONLEFT : CP_DROPDOWNBUTTONRIGHT; if (!(cmb->state & State_Enabled)) |