summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qcleanlooksstyle.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-06-09 09:10:46 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-06-09 09:52:27 (GMT)
commitc5a9996213a535ad6b1e183ed258913082213073 (patch)
tree15afd3d570b8043389483c4a39da1cb6f51887ac /src/gui/styles/qcleanlooksstyle.cpp
parentb1658783099b75097f02bef85c4ea2a469826d37 (diff)
downloadQt-c5a9996213a535ad6b1e183ed258913082213073.zip
Qt-c5a9996213a535ad6b1e183ed258913082213073.tar.gz
Qt-c5a9996213a535ad6b1e183ed258913082213073.tar.bz2
Fix focus frame on combobox on non-Windows styles
State_KeyboardFocusChange only makes sens on Windows. Follow the logic on the combobox as in PE_FrameFocusRect in the QWindowsStyle Task-number: 255482 Reviewed-by: jbache
Diffstat (limited to 'src/gui/styles/qcleanlooksstyle.cpp')
-rw-r--r--src/gui/styles/qcleanlooksstyle.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/styles/qcleanlooksstyle.cpp b/src/gui/styles/qcleanlooksstyle.cpp
index b33dfc1..805cd05 100644
--- a/src/gui/styles/qcleanlooksstyle.cpp
+++ b/src/gui/styles/qcleanlooksstyle.cpp
@@ -3305,7 +3305,8 @@ void QCleanlooksStyle::drawComplexControl(ComplexControl control, const QStyleOp
}
}
// Draw the focus rect
- if ((focus && (option->state & State_KeyboardFocusChange)) && !comboBox->editable) {
+ if (focus && !comboBox->editable
+ && ((option->state & State_KeyboardFocusChange) || styleHint(SH_UnderlineShortcut, option, widget))) {
QStyleOptionFocusRect focus;
focus.rect = subControlRect(CC_ComboBox, &comboBoxCopy, SC_ComboBoxEditField, widget)
.adjusted(0, 2, option->direction == Qt::RightToLeft ? 1 : -1, -2);