diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-06-09 09:10:46 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-06-09 09:52:27 (GMT) |
commit | c5a9996213a535ad6b1e183ed258913082213073 (patch) | |
tree | 15afd3d570b8043389483c4a39da1cb6f51887ac /src/gui/styles/qplastiquestyle.cpp | |
parent | b1658783099b75097f02bef85c4ea2a469826d37 (diff) | |
download | Qt-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/qplastiquestyle.cpp')
-rw-r--r-- | src/gui/styles/qplastiquestyle.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/styles/qplastiquestyle.cpp b/src/gui/styles/qplastiquestyle.cpp index 01c0e44..0a56213 100644 --- a/src/gui/styles/qplastiquestyle.cpp +++ b/src/gui/styles/qplastiquestyle.cpp @@ -4568,7 +4568,8 @@ void QPlastiqueStyle::drawComplexControl(ComplexControl control, const QStyleOpt } // Draw the focus rect - if (((option->state & State_HasFocus) && (option->state & State_KeyboardFocusChange)) && !comboBox->editable) { + if ((option->state & State_HasFocus) && !comboBox->editable + && ((option->state & State_KeyboardFocusChange) || styleHint(SH_UnderlineShortcut, option, widget))) { QStyleOptionFocusRect focus; focus.rect = subControlRect(CC_ComboBox, option, SC_ComboBoxEditField, widget) .adjusted(-2, 0, 2, 0); |