summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSami Merilä <sami.merila@nokia.com>2009-12-04 13:34:35 (GMT)
committerSami Merilä <sami.merila@nokia.com>2009-12-04 13:34:35 (GMT)
commit91921c880ea53a096237435ffac571a193f9c5f5 (patch)
treeefc7a437a58ac04c11954907fc7c6e6b6fbd9191
parentfe785ec5fa818b3b31777d22b434621522a532b4 (diff)
downloadQt-91921c880ea53a096237435ffac571a193f9c5f5.zip
Qt-91921c880ea53a096237435ffac571a193f9c5f5.tar.gz
Qt-91921c880ea53a096237435ffac571a193f9c5f5.tar.bz2
QS60Style: Overwrites correct stylehint color values
QS60Style overwrites correct theme colors with QCommonStyle values in QS60Style::styleHint(). In that method returned value is initialized as -1 and then if the value is still -1 after switch statement for different stylehints, the stylehint is queried from common style. Problem is that it is also getting RGB values set into return value. White color as HEX is FFFFFF and -1 as HEX is FFFFFF. So, if theme color is white for Group Text title, or for Grid lines, color is asked from QCommonStyle instead. As a fix, in 'default' case ask from QCommonStyle. Also, use RGBA instead of RGB values. Reviewed-by: Alessandro Portale
-rw-r--r--src/gui/styles/qs60style.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index 5f7ec69..aece73c 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -2343,10 +2343,10 @@ int QS60Style::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w
int retValue = -1;
switch (sh) {
case SH_Table_GridLineColor:
- retValue = QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnLineColors,2,0).rgb();
+ retValue = int(QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnLineColors,2,0).rgba());
break;
case SH_GroupBox_TextLabelColor:
- retValue = QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnTextColors,6,0).rgb();
+ retValue = int(QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnTextColors,6,0).rgba());
break;
case SH_ScrollBar_ScrollWhenPointerLeavesControl:
retValue = true;
@@ -2402,10 +2402,9 @@ int QS60Style::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w
retValue = QFormLayout::WrapLongRows;
break;
default:
+ retValue = QCommonStyle::styleHint(sh, opt, widget, hret);
break;
}
- if (retValue == -1)
- retValue = QCommonStyle::styleHint(sh, opt, widget, hret);
return retValue;
}