diff options
author | Jani Hautakangas <ext-jani.hautakangas@nokia.com> | 2010-01-22 09:08:08 (GMT) |
---|---|---|
committer | Jani Hautakangas <ext-jani.hautakangas@nokia.com> | 2010-01-22 09:11:00 (GMT) |
commit | b22b06debf9d7e964244a0a613354be0ea9e07b7 (patch) | |
tree | 7feb63a4fc260dc886cfda15b9d26d922a78a6fb /src/gui/dialogs | |
parent | e575816cd618841e90e8933ff52e40a8581d3328 (diff) | |
download | Qt-b22b06debf9d7e964244a0a613354be0ea9e07b7.zip Qt-b22b06debf9d7e964244a0a613354be0ea9e07b7.tar.gz Qt-b22b06debf9d7e964244a0a613354be0ea9e07b7.tar.bz2 |
Fix for symbian dialog background transparency.
If Avkon components support transparency then dialog background is transparent
enabling rounded corners.
Reviewed-by: Sami Merila
Diffstat (limited to 'src/gui/dialogs')
-rw-r--r-- | src/gui/dialogs/qdialog.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gui/dialogs/qdialog.cpp b/src/gui/dialogs/qdialog.cpp index 3650051..9e11ebf 100644 --- a/src/gui/dialogs/qdialog.cpp +++ b/src/gui/dialogs/qdialog.cpp @@ -265,6 +265,14 @@ QDialog::QDialog(QWidget *parent, Qt::WindowFlags f) if (!qt_wince_is_smartphone()) setWindowFlags(windowFlags() | Qt::WindowOkButtonHint | QFlag(qt_wince_is_mobile() ? 0 : Qt::WindowCancelButtonHint)); #endif + +#ifdef Q_WS_S60 + if (S60->avkonComponentsSupportTransparency()) { + bool noSystemBackground = testAttribute(Qt::WA_NoSystemBackground); + setAttribute(Qt::WA_TranslucentBackground); // also sets WA_NoSystemBackground + setAttribute(Qt::WA_NoSystemBackground, noSystemBackground); // restore system background attribute + } +#endif } #ifdef QT3_SUPPORT @@ -294,6 +302,14 @@ QDialog::QDialog(QDialogPrivate &dd, QWidget *parent, Qt::WindowFlags f) if (!qt_wince_is_smartphone()) setWindowFlags(windowFlags() | Qt::WindowOkButtonHint | QFlag(qt_wince_is_mobile() ? 0 : Qt::WindowCancelButtonHint)); #endif + +#ifdef Q_WS_S60 + if (S60->avkonComponentsSupportTransparency()) { + bool noSystemBackground = testAttribute(Qt::WA_NoSystemBackground); + setAttribute(Qt::WA_TranslucentBackground); // also sets WA_NoSystemBackground + setAttribute(Qt::WA_NoSystemBackground, noSystemBackground); // restore system background attribute + } +#endif } /*! |