From a35c52abe95f224af062550e4954f7cbefca1bd8 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Thu, 8 Oct 2009 21:20:22 +0200 Subject: Color role with higher contrast for focusrect MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Low-risk, high value change. Beta worthy! As much as QPalette::Highlight sounds like a suitable color role for drawing a focus rect... It simply did not work well with a lot of S60 themes (e.g. the default N95 theme). QPalette::Text is a better candidate, since the S60 themes promise a good contrast of text on background graphics. Reviewed-By: Sami Merilä --- src/gui/styles/qs60style.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 59787da..4fa1d03 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -1864,7 +1864,7 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, painter->save(); painter->setRenderHint(QPainter::Antialiasing); painter->setOpacity(opacity); - painter->setPen(QPen(option->palette.color(QPalette::Highlight), penWidth)); + painter->setPen(QPen(option->palette.color(QPalette::Text), penWidth)); painter->drawRoundedRect(adjustedRect, roundRectRadius, roundRectRadius); painter->restore(); } -- cgit v0.12