diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-11-18 12:39:40 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-11-18 12:39:40 (GMT) |
commit | d46da3a141ad05c9f7cd7ea94e254980748329da (patch) | |
tree | 72beadfabcf66d725b10bbc5ce3d8c38137ed888 /src/gui/styles | |
parent | 62e641691b9a3eadc8b9fb2e31150cdf5b66115d (diff) | |
parent | 6f6b2ab07c0dbd0ebdb25f1fbe537ea12bdffee4 (diff) | |
download | Qt-d46da3a141ad05c9f7cd7ea94e254980748329da.zip Qt-d46da3a141ad05c9f7cd7ea94e254980748329da.tar.gz Qt-d46da3a141ad05c9f7cd7ea94e254980748329da.tar.bz2 |
Merge remote branch 'mainline/4.6' into 4.6
Diffstat (limited to 'src/gui/styles')
-rw-r--r-- | src/gui/styles/qgtkstyle_p.cpp | 4 | ||||
-rw-r--r-- | src/gui/styles/qs60style.cpp | 10 | ||||
-rw-r--r-- | src/gui/styles/qstylesheetstyle.cpp | 8 |
3 files changed, 19 insertions, 3 deletions
diff --git a/src/gui/styles/qgtkstyle_p.cpp b/src/gui/styles/qgtkstyle_p.cpp index 7119a4f..62d9197 100644 --- a/src/gui/styles/qgtkstyle_p.cpp +++ b/src/gui/styles/qgtkstyle_p.cpp @@ -202,8 +202,12 @@ Ptr_gnome_vfs_init QGtkStylePrivate::gnome_vfs_init = 0; typedef int (*x11ErrorHandler)(Display*, XErrorEvent*); +Q_DECLARE_METATYPE(QGtkStylePrivate*); + static void gtkStyleSetCallback(GtkWidget*, QGtkStylePrivate* stylePrivate) { + qRegisterMetaType<QGtkStylePrivate *>(); + // We have to let this function return and complete the event // loop to ensure that all gtk widgets have been styled before // updating diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 939ea45..7c3e11f 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -783,6 +783,14 @@ void QS60StylePrivate::setThemePaletteHash(QPalette *palette) const widgetPalette.setBrush(QPalette::Window, QBrush()); QApplication::setPalette(widgetPalette, "QScrollArea"); widgetPalette = *palette; + + //Webpages should not use S60 theme colors as they are designed to work + //with themeBackground and do not generally mesh well with web page backgrounds. + QPalette webPalette = *palette; + webPalette.setColor(QPalette::WindowText, Qt::black); + webPalette.setColor(QPalette::Text, Qt::black); + QApplication::setPalette(webPalette, "QWebView"); + QApplication::setPalette(webPalette, "QGraphicsWebView"); } QSize QS60StylePrivate::partSize(QS60StyleEnums::SkinParts part, SkinElementFlags flags) @@ -2007,7 +2015,7 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti buttonRect.adjust(0,-newY,0,-newY); painter->save(); - QColor themeColor = d->s60Color(QS60StyleEnums::CL_QsnIconColors, 13, option); + QColor themeColor = d->s60Color(QS60StyleEnums::CL_QsnTextColors, 6, option); QColor buttonTextColor = option->palette.buttonText().color(); if (themeColor != buttonTextColor) painter->setPen(buttonTextColor); diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp index 59210c3..8b40931 100644 --- a/src/gui/styles/qstylesheetstyle.cpp +++ b/src/gui/styles/qstylesheetstyle.cpp @@ -4637,6 +4637,7 @@ int QStyleSheetStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const } break; +#ifndef QT_NO_TABWIDGET case PM_TabBarTabHSpace: case PM_TabBarTabVSpace: subRule = renderRule(w, opt, PseudoElement_TabBarTab); @@ -4660,11 +4661,14 @@ int QStyleSheetStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const return 0; break; - case PM_TabBarBaseOverlap: - if (hasStyleRule(w->parentWidget(), PseudoElement_TabWidgetPane)) { + case PM_TabBarBaseOverlap: { + const QWidget *tabWidget = qobject_cast<const QTabWidget *>(w) ? w : w->parentWidget(); + if (hasStyleRule(tabWidget, PseudoElement_TabWidgetPane)) { return 0; } break; + } +#endif // QT_NO_TABWIDGET case PM_SliderThickness: // horizontal slider's height (sizeHint) case PM_SliderLength: // minimum length of slider |