summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkku Luukkainen <markku.luukkainen@digia.com>2009-06-18 11:53:48 (GMT)
committerMarkku Luukkainen <markku.luukkainen@digia.com>2009-06-18 11:53:48 (GMT)
commitaba16af9e5f3d6d860aa403381940d26dae71df7 (patch)
tree1ccae2fa06ed240f721ced9de3d553fd7d00c292
parent0045fd9860b0fbc4cb5af88127c31753c5c03694 (diff)
parentdac3266526afd188336ca50d2fcb6c3c96c5301c (diff)
downloadQt-aba16af9e5f3d6d860aa403381940d26dae71df7.zip
Qt-aba16af9e5f3d6d860aa403381940d26dae71df7.tar.gz
Qt-aba16af9e5f3d6d860aa403381940d26dae71df7.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt-s60-public
-rw-r--r--demos/browser/browser.pro4
-rw-r--r--demos/browser/searchlineedit.cpp4
-rw-r--r--demos/browser/webview.cpp2
-rw-r--r--src/gui/styles/qs60style.cpp23
4 files changed, 25 insertions, 8 deletions
diff --git a/demos/browser/browser.pro b/demos/browser/browser.pro
index 7b7c448..72c6e88 100644
--- a/demos/browser/browser.pro
+++ b/demos/browser/browser.pro
@@ -3,7 +3,7 @@ TARGET = browser
QT += webkit network
CONFIG += qt warn_on
-contains(QT_BUILD_PARTS, tools): CONFIG += uitools
+contains(QT_BUILD_PARTS, tools):!symbian: CONFIG += uitools
else: DEFINES += QT_NO_UITOOLS
FORMS += \
@@ -92,4 +92,4 @@ INSTALLS += target sources
include($$QT_SOURCE_TREE/demos/demobase.pri)
-symbian:TARGET.UID3 = 0xA000CF70 \ No newline at end of file
+symbian:TARGET.UID3 = 0xA000CF70
diff --git a/demos/browser/searchlineedit.cpp b/demos/browser/searchlineedit.cpp
index 8f668e0..aa00475 100644
--- a/demos/browser/searchlineedit.cpp
+++ b/demos/browser/searchlineedit.cpp
@@ -50,7 +50,9 @@
ClearButton::ClearButton(QWidget *parent)
: QAbstractButton(parent)
{
+#ifndef QT_NO_CURSOR
setCursor(Qt::ArrowCursor);
+#endif // QT_NO_CURSOR
setToolTip(tr("Clear"));
setVisible(false);
setFocusPolicy(Qt::NoFocus);
@@ -103,7 +105,9 @@ SearchButton::SearchButton(QWidget *parent)
m_menu(0)
{
setObjectName(QLatin1String("SearchButton"));
+#ifndef QT_NO_CURSOR
setCursor(Qt::ArrowCursor);
+#endif //QT_NO_CURSOR
setFocusPolicy(Qt::NoFocus);
}
diff --git a/demos/browser/webview.cpp b/demos/browser/webview.cpp
index 6c4d857..63505f9 100644
--- a/demos/browser/webview.cpp
+++ b/demos/browser/webview.cpp
@@ -54,7 +54,9 @@
#include <QtWebKit/QWebHitTestResult>
+#ifndef QT_NO_UITOOLS
#include <QtUiTools/QUiLoader>
+#endif //QT_NO_UITOOLS
#include <QtCore/QDebug>
#include <QtCore/QBuffer>
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index d2bd679..b80adc2 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -478,7 +478,9 @@ void QS60StylePrivate::setThemePalette(QApplication *app) const
Q_UNUSED(app)
QPalette widgetPalette = QPalette(Qt::white);
setThemePalette(&widgetPalette);
- QApplication::setPalette(widgetPalette);
+ QApplication::setPalette(widgetPalette); //calling QApplication::setPalette clears palette hash
+ setThemePaletteHash(&widgetPalette);
+ storeThemePalette(&widgetPalette);
}
void QS60StylePrivate::setThemePalette(QStyleOption *option) const
@@ -664,7 +666,7 @@ void QS60StylePrivate::setThemePalette(QWidget *widget) const
{
if(!widget)
return;
- QPalette widgetPalette = widget->palette();
+ QPalette widgetPalette = QApplication::palette(widget);
//header view and its viewport need to be set 100% transparent button color, since drawing code will
//draw transparent theme graphics to table column and row headers.
@@ -716,9 +718,6 @@ void QS60StylePrivate::setThemePalette(QPalette *palette) const
palette->setColor(QPalette::Midlight, palette->color(QPalette::Button).lighter(125));
palette->setColor(QPalette::Mid, palette->color(QPalette::Button).darker(150));
palette->setColor(QPalette::Shadow, Qt::black);
-
- setThemePaletteHash(palette);
- storeThemePalette(palette);
}
void QS60StylePrivate::deleteThemePalette()
@@ -791,6 +790,18 @@ void QS60StylePrivate::setThemePaletteHash(QPalette *palette) const
QApplication::setPalette(widgetPalette, "QLineEdit");
widgetPalette = *palette;
+ widgetPalette.setColor(QPalette::All, QPalette::Text,
+ s60Color(QS60StyleEnums::CL_QsnTextColors, 34, 0));
+ widgetPalette.setColor(QPalette::All, QPalette::HighlightedText,
+ s60Color(QS60StyleEnums::CL_QsnTextColors, 24, 0));
+ QApplication::setPalette(widgetPalette, "QTextEdit");
+ widgetPalette = *palette;
+
+ widgetPalette.setColor(QPalette::All, QPalette::HighlightedText,
+ s60Color(QS60StyleEnums::CL_QsnTextColors, 24, 0));
+ QApplication::setPalette(widgetPalette, "QComboBox");
+ widgetPalette = *palette;
+
widgetPalette.setColor(QPalette::WindowText, mainAreaTextColor);
widgetPalette.setColor(QPalette::Button, QApplication::palette().color(QPalette::Button));
widgetPalette.setColor(QPalette::Dark, mainAreaTextColor.darker());
@@ -1662,7 +1673,7 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
case CE_MenuItem:
if (const QStyleOptionMenuItem *menuItem = qstyleoption_cast<const QStyleOptionMenuItem *>(option)) {
QStyleOptionMenuItem optionMenuItem = *menuItem;
-
+
bool drawSubMenuIndicator = false;
switch(menuItem->menuItemType) {
case QStyleOptionMenuItem::Scroller: