summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qs60style.cpp
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2009-04-24 14:13:56 (GMT)
committerJason Barron <jbarron@trolltech.com>2009-04-28 14:40:57 (GMT)
commit76d46a2deedc69108cefce811e8dc6a65f9151e6 (patch)
treefe730eefe7a9d49bd5399563385ac4ef22d3e9f4 /src/gui/styles/qs60style.cpp
parent27e57ccd327fbc1edbb23d9959c5388023974dfc (diff)
downloadQt-76d46a2deedc69108cefce811e8dc6a65f9151e6.zip
Qt-76d46a2deedc69108cefce811e8dc6a65f9151e6.tar.gz
Qt-76d46a2deedc69108cefce811e8dc6a65f9151e6.tar.bz2
Fix background painting.
This is a reverted patch that has been rebased on to another branch and then caused conflicts so it might contain an error or two. Basically we need to store the background texture from the style into the palette so that it can be replaced by applications that don't want it.
Diffstat (limited to 'src/gui/styles/qs60style.cpp')
-rw-r--r--src/gui/styles/qs60style.cpp24
1 files changed, 1 insertions, 23 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index 58dcb98..65ce104 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -485,7 +485,7 @@ void QS60StylePrivate::setThemePalette(QWidget *widget) const
QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnHighlightColors, 2, 0));
// set these as transparent so that styled full screen theme background is visible
widgetPalette.setColor(QPalette::AlternateBase, Qt::transparent);
- widgetPalette.setColor(QPalette::Window, Qt::transparent);
+ widgetPalette.setColor(QPalette::Window, QS60StylePrivate::backgroundTexture());
widgetPalette.setColor(QPalette::Base, Qt::transparent);
// set button and tooltipbase based on pixel colors
QColor buttonColor = colorFromFrameGraphics(QS60StylePrivate::SF_ButtonNormal);
@@ -530,17 +530,6 @@ void QS60Style::polish(QWidget *widget)
Q_D(const QS60Style);
QCommonStyle::polish(widget);
- if (QAbstractScrollArea *scrollArea = qobject_cast<QAbstractScrollArea *>(widget)){
- scrollArea->viewport()->setAutoFillBackground(false);
- }
-
- if (false
-#ifndef QT_NO_SCROLLBAR
- || qobject_cast<QScrollBar *>(widget)
-#endif
- ) {
- widget->setAttribute(Qt::WA_OpaquePaintEvent, false);
- }
if (QS60StylePrivate::isSkinnableDialog(widget)) {
widget->setAttribute(Qt::WA_StyledBackground);
} else if (false
@@ -565,17 +554,6 @@ void QS60Style::polish(QWidget *widget)
void QS60Style::unpolish(QWidget *widget)
{
- if (QAbstractScrollArea *scrollArea = qobject_cast<QAbstractScrollArea *>(widget)){
- scrollArea->viewport()->setAutoFillBackground(true);
- }
-
- if (false
-#ifndef QT_NO_SCROLLBAR
- || qobject_cast<QScrollBar *>(widget)
-#endif
- ) {
- widget->setAttribute(Qt::WA_OpaquePaintEvent);
- }
if (QS60StylePrivate::isSkinnableDialog(widget)) {
widget->setAttribute(Qt::WA_StyledBackground, false);
} else if (false