summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSami Merila <sami.merila@nokia.com>2010-04-20 13:28:46 (GMT)
committerSami Merila <sami.merila@nokia.com>2010-04-20 13:28:46 (GMT)
commit6e3860d17537bbb9789811dd725260bc971f1b46 (patch)
treef5b1ef72da8381e53867b0870a1603bce0c13079 /src
parent11b3e020b9550d849fe5291da91ef09d66b74da5 (diff)
downloadQt-6e3860d17537bbb9789811dd725260bc971f1b46.zip
Qt-6e3860d17537bbb9789811dd725260bc971f1b46.tar.gz
Qt-6e3860d17537bbb9789811dd725260bc971f1b46.tar.bz2
QS60Style: Style draws a focus frame to context menus and popups
Currently QS60Style draws a ficus frame around context menus and combobox popups. This should be removed, as these widgets have keypad navigable item highlight rect inside them AND the widgets cannot be navigated in/out from other widgets. Also, currently there is no room to draw the focus frame to left and right border, so the focus frame looks somewhat strange theme colored think line above and below popup/menu. Task-number: QTBUG-10064 Reviewed-by: Alessandro Portale
Diffstat (limited to 'src')
-rw-r--r--src/gui/styles/qs60style.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index 6974959..6f05908 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -3156,6 +3156,12 @@ bool QS60Style::event(QEvent *e)
#ifdef QT_KEYPAD_NAVIGATION
case QEvent::FocusIn:
if (QWidget *focusWidget = QApplication::focusWidget()) {
+
+ // Menus and combobox popups do not draw focus frame around them
+ if (qobject_cast<QComboBoxListView *>(focusWidget) ||
+ qobject_cast<QMenu *>(focusWidget))
+ break;
+
if (!d->m_focusFrame)
d->m_focusFrame = new QFocusFrame(focusWidget);
d->m_focusFrame->setWidget(focusWidget);