diff options
author | Jason Barron <jbarron@trolltech.com> | 2010-01-14 13:20:24 (GMT) |
---|---|---|
committer | Jason Barron <jbarron@trolltech.com> | 2010-01-14 15:21:33 (GMT) |
commit | 0047fd3703fcec3afbbaff13e7a2d96d60f3f8f4 (patch) | |
tree | 1f2b23a03b8163fd0fd65fcbfbfc9a78b5ada214 /src | |
parent | bc82db4d08860735bbae584a54d1b591c760e38b (diff) | |
download | Qt-0047fd3703fcec3afbbaff13e7a2d96d60f3f8f4.zip Qt-0047fd3703fcec3afbbaff13e7a2d96d60f3f8f4.tar.gz Qt-0047fd3703fcec3afbbaff13e7a2d96d60f3f8f4.tar.bz2 |
Enable surface transparency support on Symbian^4.
On Symbian^4 systems where the window supports surface transparency, we
use this for the Qt::WA_TranslucentBackground flag instead of the
previous method.
Task-number: QT-2026
Reviewed-by: Iain
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/global/qglobal.h | 4 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_s60.cpp | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 52e9845..f350d1a 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -2419,6 +2419,10 @@ QT3_SUPPORT Q_CORE_EXPORT const char *qInstallPathSysconf(); //enabling new graphics resources #define QT_SYMBIAN_SUPPORTS_SGIMAGE #define QT_SYMBIAN_SUPPORTS_ADVANCED_POINTER + +#ifdef SYMBIAN_GRAPHICS_WSERV_QT_EFFECTS +#define Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE +#endif #endif diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 4c0e21e..00f2213 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -389,9 +389,13 @@ void QWidgetPrivate::create_sys(WId window, bool /* initializeWindow */, bool de if (!isOpaque) { RWindow *const window = static_cast<RWindow *>(drawableWindow); +#ifdef Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE + window->SetSurfaceTransparency(true); +#else const TDisplayMode displayMode = static_cast<TDisplayMode>(window->SetRequiredDisplayMode(EColor16MA)); if (window->SetTransparencyAlphaChannel() == KErrNone) window->SetBackgroundColor(TRgb(255, 255, 255, 0)); +#endif } } @@ -707,12 +711,16 @@ void QWidgetPrivate::s60UpdateIsOpaque() RWindow *const window = static_cast<RWindow *>(q->effectiveWinId()->DrawableWindow()); +#ifdef Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE + window->SetSurfaceTransparency(!isOpaque); +#else if (!isOpaque) { const TDisplayMode displayMode = static_cast<TDisplayMode>(window->SetRequiredDisplayMode(EColor16MA)); if (window->SetTransparencyAlphaChannel() == KErrNone) window->SetBackgroundColor(TRgb(255, 255, 255, 0)); } else window->SetTransparentRegion(TRegionFix<1>()); +#endif } void QWidgetPrivate::setWindowIcon_sys(bool forceReset) |