summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Iacovitti <aiacovitti@libero.it>2012-06-08 09:12:55 (GMT)
committerAndrea Iacovitti <aiacovitti@libero.it>2012-06-08 09:12:55 (GMT)
commit673ba7a5c692c3c5ce28aae20a92f77d9bdcd758 (patch)
tree7e0616d73e36ba4321b119e5cec1185ece1693be
parentf2383c5d72a74da36c8414974e312aae2ddbcb9a (diff)
Switch from obsoleted ColorRole:
QPalette::Background -> QPalette::Window QPalette::Foreground -> QPalette::WindowText
-rw-r--r--khtml/css/cssstyleselector.cpp4
-rw-r--r--khtml/misc/helper.cpp10
-rw-r--r--khtml/rendering/render_replaced.cpp8
-rw-r--r--khtml/test_regression.cpp8
4 files changed, 15 insertions, 15 deletions
diff --git a/khtml/css/cssstyleselector.cpp b/khtml/css/cssstyleselector.cpp
index fcd2505..3a8b2bd 100644
--- a/khtml/css/cssstyleselector.cpp
+++ b/khtml/css/cssstyleselector.cpp
@@ -3051,8 +3051,8 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value )
case CSS_PROP_SCROLLBAR_TRACK_COLOR:
style->setPaletteColor(QPalette::Active, QPalette::Mid, col);
style->setPaletteColor(QPalette::Inactive, QPalette::Mid, col);
- style->setPaletteColor(QPalette::Active, QPalette::Background, col);
- style->setPaletteColor(QPalette::Inactive, QPalette::Background, col);
+ style->setPaletteColor(QPalette::Active, QPalette::Window, col);
+ style->setPaletteColor(QPalette::Inactive, QPalette::Window, col);
// fall through
case CSS_PROP_SCROLLBAR_BASE_COLOR:
style->setPaletteColor(QPalette::Active, QPalette::Base, col);
diff --git a/khtml/misc/helper.cpp b/khtml/misc/helper.cpp
index 09696b1..20c7ad8 100644
--- a/khtml/misc/helper.cpp
+++ b/khtml/misc/helper.cpp
@@ -135,10 +135,10 @@ static const uiColors uimap[] = {
{ CSS_VAL_INFOBACKGROUND, QPalette::Normal, QPalette::ToolTipBase },
{ CSS_VAL_INFOTEXT, QPalette::Normal, QPalette::ToolTipText },
// Menu colors
- { CSS_VAL_MENU, QPalette::Normal, QPalette::Background },
+ { CSS_VAL_MENU, QPalette::Normal, QPalette::Window },
{ CSS_VAL_MENUTEXT, QPalette::Normal, QPalette::Text },
// Scroll bar color
- { CSS_VAL_SCROLLBAR, QPalette::Normal, QPalette::Background },
+ { CSS_VAL_SCROLLBAR, QPalette::Normal, QPalette::Window },
// 3D elements
{ CSS_VAL_THREEDDARKSHADOW, QPalette::Normal, QPalette::Dark },
{ CSS_VAL_THREEDFACE, QPalette::Normal, QPalette::Button },
@@ -148,7 +148,7 @@ static const uiColors uimap[] = {
// Window background
{ CSS_VAL_WINDOW, QPalette::Normal, QPalette::Base },
// Window frame
- { CSS_VAL_WINDOWFRAME, QPalette::Normal, QPalette::Background },
+ { CSS_VAL_WINDOWFRAME, QPalette::Normal, QPalette::Window },
// WindowText
{ CSS_VAL_WINDOWTEXT, QPalette::Normal, QPalette::Text },
{ CSS_VAL_TEXT, QPalette::Normal, QPalette::Text },
@@ -173,13 +173,13 @@ QColor khtml::colorForCSSValue( int css_value )
if ( !uicol->css_value ) {
switch ( css_value ) {
case CSS_VAL_ACTIVEBORDER:
- return qApp->palette().color(QPalette::Normal, QPalette::Background);
+ return qApp->palette().color(QPalette::Normal, QPalette::Window);
case CSS_VAL_ACTIVECAPTION:
return KGlobalSettings::activeTitleColor();
case CSS_VAL_CAPTIONTEXT:
return KGlobalSettings::activeTextColor();
case CSS_VAL_INACTIVEBORDER:
- return qApp->palette().color(QPalette::Inactive, QPalette::Background);
+ return qApp->palette().color(QPalette::Inactive, QPalette::Window);
case CSS_VAL_INACTIVECAPTION:
return KGlobalSettings::inactiveTitleColor();
case CSS_VAL_INACTIVECAPTIONTEXT:
diff --git a/khtml/rendering/render_replaced.cpp b/khtml/rendering/render_replaced.cpp
index 984ec9e..e10d92b 100644
--- a/khtml/rendering/render_replaced.cpp
+++ b/khtml/rendering/render_replaced.cpp
@@ -422,10 +422,10 @@ void RenderWidget::updateFromElement()
QPalette::ColorRole cr;
};
const struct ColorSet toSet [] = {
- { QPalette::Active, QPalette::Foreground },
+ { QPalette::Active, QPalette::WindowText },
{ QPalette::Active, QPalette::ButtonText },
{ QPalette::Active, QPalette::Text },
- { QPalette::Inactive, QPalette::Foreground },
+ { QPalette::Inactive, QPalette::WindowText },
{ QPalette::Inactive, QPalette::ButtonText },
{ QPalette::Inactive, QPalette::Text },
{ QPalette::NColorGroups, QPalette::NColorRoles },
@@ -450,10 +450,10 @@ void RenderWidget::updateFromElement()
// for really dark fg - use darkgray disabled fg,
// as ::light is pretty useless in this range
disfg = Qt::darkGray;
- pal.setColor(QPalette::Disabled,QPalette::Foreground,disfg);
+ pal.setColor(QPalette::Disabled,QPalette::WindowText,disfg);
pal.setColor(QPalette::Disabled,QPalette::Text,disfg);
pal.setColor(QPalette::Disabled,QPalette::ButtonText,disfg);
- non_trans_pal.setColor(QPalette::Disabled,QPalette::Foreground,disfg);
+ non_trans_pal.setColor(QPalette::Disabled,QPalette::WindowText,disfg);
non_trans_pal.setColor(QPalette::Disabled,QPalette::Text,disfg);
non_trans_pal.setColor(QPalette::Disabled,QPalette::ButtonText,disfg);
}
diff --git a/khtml/test_regression.cpp b/khtml/test_regression.cpp
index ce6aa99..1b3a912 100644
--- a/khtml/test_regression.cpp
+++ b/khtml/test_regression.cpp
@@ -82,7 +82,7 @@ struct PalInfo
PalInfo palInfo[] =
{
- {QPalette::Foreground, 0xff000000},
+ {QPalette::WindowText, 0xff000000},
{QPalette::Button, 0xffc0c0c0},
{QPalette::Light, 0xffffffff},
{QPalette::Midlight, 0xffdfdfdf},
@@ -92,7 +92,7 @@ PalInfo palInfo[] =
{QPalette::BrightText, 0xffffffff},
{QPalette::ButtonText, 0xff000000},
{QPalette::Base, 0xffffffff},
- {QPalette::Background, 0xffc0c0c0},
+ {QPalette::Window, 0xffc0c0c0},
{QPalette::Shadow, 0xff000000},
{QPalette::Highlight, 0xff000080},
{QPalette::HighlightedText, 0xffffffff},
@@ -103,7 +103,7 @@ PalInfo palInfo[] =
PalInfo disPalInfo[] =
{
- {QPalette::Foreground, 0xff808080},
+ {QPalette::WindowText, 0xff808080},
{QPalette::Button, 0xffc0c0c0},
{QPalette::Light, 0xffffffff},
{QPalette::Midlight, 0xffdfdfdf},
@@ -113,7 +113,7 @@ PalInfo disPalInfo[] =
{QPalette::BrightText, 0xffffffff},
{QPalette::ButtonText, 0xff808080},
{QPalette::Base, 0xffc0c0c0},
- {QPalette::Background, 0xffc0c0c0},
+ {QPalette::Window, 0xffc0c0c0},
{QPalette::Shadow, 0xff000000},
{QPalette::Highlight, 0xff000080},
{QPalette::HighlightedText, 0xffffffff},