summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qs60style_simulated.cpp
diff options
context:
space:
mode:
authorAlessandro Portale <aportale@trolltech.com>2009-05-28 11:49:08 (GMT)
committerAlessandro Portale <aportale@trolltech.com>2009-05-28 11:49:08 (GMT)
commit1ee484031d2a240bd7019753e83bb473ea9891de (patch)
treea3dbde228d49159ecac8ca2f2c55eb41a60616ec /src/gui/styles/qs60style_simulated.cpp
parent131d8f90aa2991866884a896fdebcc05a020a905 (diff)
downloadQt-1ee484031d2a240bd7019753e83bb473ea9891de.zip
Qt-1ee484031d2a240bd7019753e83bb473ea9891de.tar.gz
Qt-1ee484031d2a240bd7019753e83bb473ea9891de.tar.bz2
Enabled QtS60Style background filling also for _simulated, by moving
some code to qs60style.cpp. De-duplicated some code in qt_s60_fill_background. The unused QT_S60STYLE_LAYOUTDATA_SIMULATED had to go, too.
Diffstat (limited to 'src/gui/styles/qs60style_simulated.cpp')
-rw-r--r--src/gui/styles/qs60style_simulated.cpp23
1 files changed, 8 insertions, 15 deletions
diff --git a/src/gui/styles/qs60style_simulated.cpp b/src/gui/styles/qs60style_simulated.cpp
index 3edc874..b6ad0ac 100644
--- a/src/gui/styles/qs60style_simulated.cpp
+++ b/src/gui/styles/qs60style_simulated.cpp
@@ -42,19 +42,6 @@ QS60StylePrivate::QS60StylePrivate()
setCurrentLayout(0);
}
-QS60StylePrivate::~QS60StylePrivate()
-{
-}
-
-short QS60StylePrivate::pixelMetric(int metric)
-{
- Q_ASSERT(metric < MAX_PIXELMETRICS);
- const short returnValue = m_pmPointer[metric];
- if (returnValue==-909)
- return -1;
- return returnValue;
-}
-
QColor QS60StylePrivate::s60Color(QS60StyleEnums::ColorLists list,
int index, const QStyleOption *option)
{
@@ -194,7 +181,7 @@ QVariant QS60StylePrivate::styleProperty_specific(const char *name) const
QPixmap QS60StylePrivate::backgroundTexture()
{
if (!m_background) {
- const QSize size = QApplication::activeWindow()?QApplication::activeWindow()->size():QSize(100, 100);
+ const QSize size = QApplication::desktop()->screen()->size();
QPixmap background = part(QS60StyleEnums::SP_QsnBgScreen, size);
m_background = new QPixmap(background);
}
@@ -216,7 +203,6 @@ bool QS60StylePrivate::isToolBarBackground()
return true;
}
-
QFont QS60StylePrivate::s60Font_specific(QS60StyleEnums::FontCategories fontCategory, int pointSize)
{
QFont result;
@@ -281,6 +267,13 @@ void QS60Style::setS60Theme(const QHash<QString, QPicture> &parts,
QS60StyleModeSpecifics::m_partPictures = parts;
QS60StyleModeSpecifics::m_colors = colors;
d->clearCaches(QS60StylePrivate::CC_ThemeChange);
+ d->setBackgroundTexture(qApp);
+}
+
+QPoint qt_s60_fill_background_offset(const QWidget *targetWidget)
+{
+ Q_UNUSED(targetWidget)
+ return QPoint();
}
QT_END_NAMESPACE