summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/styles/qs60style.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index 42be96293e..50eb2e1a43 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -2042,13 +2042,12 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
painter->save();
const int penWidth = QS60StylePrivate::focusRectPenWidth();
#ifdef QT_KEYPAD_NAVIGATION
- const Qt::PenStyle penStyle = widget->hasEditFocus() ? Qt::SolidLine :Qt::DotLine;
+ const Qt::PenStyle penStyle = widget->hasEditFocus() ? Qt::SolidLine :Qt::DashLine;
const qreal opacity = widget->hasEditFocus() ? 0.6 : 0.4;
#else
const Qt::PenStyle penStyle = Qt::SolidLine;
const qreal opacity = 0.5;
#endif
- painter->setPen(QPen(option->palette.color(QPalette::Text), penWidth, penStyle));
painter->setRenderHint(QPainter::Antialiasing);
painter->setOpacity(opacity);
// Because of Qts coordinate system, we need to tweak the rect by .5 pixels, otherwise it gets blurred.
@@ -2059,7 +2058,15 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
rectAdjustment + penWidth - 1,
-rectAdjustment - penWidth + 1,
-rectAdjustment - penWidth + 1);
- painter->drawRoundedRect(adjustedRect, penWidth * 1.5, penWidth * 1.5);
+ const qreal roundRectRadius = penWidth * 1.5;
+#ifdef QT_KEYPAD_NAVIGATION
+ if (penStyle != Qt::SolidLine) {
+ painter->setPen(QPen(option->palette.color(QPalette::HighlightedText), penWidth, Qt::SolidLine));
+ painter->drawRoundedRect(adjustedRect, roundRectRadius, roundRectRadius);
+ }
+#endif
+ painter->setPen(QPen((option->palette.color(QPalette::Text), penWidth, penStyle)));
+ painter->drawRoundedRect(adjustedRect, roundRectRadius, roundRectRadius);
painter->restore();
}
}