From 6928ffb7533d23f0be220116a7b11d90bee72fb5 Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Wed, 23 Dec 2009 13:25:51 +0200 Subject: QWidget with the window flag Qt::Dialog is not decorated as a dialog Previously style casted widgets to QDialog to see if it is able to draw dialog background theme graphic. As a fix, we now query window flag from the widget and if it is equivalent of Qt::Dialog, draw dialog background. Task-number: QTBUG-5930 Reviewed-by: Janne Koskinen --- src/gui/styles/qs60style.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 01b9fa4..b386c28 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -339,7 +339,7 @@ QColor QS60StylePrivate::lighterColor(const QColor &baseColor) bool QS60StylePrivate::drawsOwnThemeBackground(const QWidget *widget) { - return qobject_cast (widget); + return (widget ? (widget->windowType() == Qt::Dialog) : false); } QFont QS60StylePrivate::s60Font( -- cgit v0.12