diff options
author | Janne Anttila <janne.anttila@digia.com> | 2009-10-30 14:08:46 (GMT) |
---|---|---|
committer | Janne Anttila <janne.anttila@digia.com> | 2009-10-30 14:12:27 (GMT) |
commit | 8910b449dafcb3475ab8c6f90213cd632412da68 (patch) | |
tree | 2901e5690e30269228c19dfcaae63ace5a4728a6 | |
parent | 4c015d42f639eac882dd74d967c81242a3ec6b13 (diff) | |
download | Qt-8910b449dafcb3475ab8c6f90213cd632412da68.zip Qt-8910b449dafcb3475ab8c6f90213cd632412da68.tar.gz Qt-8910b449dafcb3475ab8c6f90213cd632412da68.tar.bz2 |
Fixed statuspane visibility after dialog closed from fullsreen widget.
- Comparing TBool == bool did not work correctly since TBool is
effectively int. For example statusPane->IsVisible() in this particular
case returns 2, which compared to true as an int fails. Casting to bool
seems to solve the problem. Another possibility would be to use Symbian
COMPARE_BOOLS macro.
- Changing statuspane visibility now affects to widget size also
- Some tab/space fixes
Task-number: QTBUG-4876
Reviewed-by: Sami Merila
-rw-r--r-- | src/gui/kernel/qapplication_s60.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 30bf99a..e5ee2f1 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -836,7 +836,7 @@ void QSymbianControl::Draw(const TRect& controlRect) const if (qwidget->d_func()->isOpaque) gc.SetDrawMode(CGraphicsContext::EDrawModeWriteAlpha); gc.BitBlt(controlRect.iTl, bitmap, backingStoreRect); - } + } } else { surface->flush(qwidget, QRegion(qt_TRect2QRect(backingStoreRect)), QPoint()); } @@ -910,9 +910,9 @@ void QSymbianControl::FocusChanged(TDrawNow /* aDrawNow */) CEikStatusPane* statusPane = S60->statusPane(); CEikButtonGroupContainer* buttonGroup = S60->buttonGroupContainer(); bool isFullscreen = qwidget->windowState() & Qt::WindowFullScreen; - if (statusPane && (statusPane->IsVisible() == isFullscreen)) + if (statusPane && (bool)statusPane->IsVisible() == isFullscreen) statusPane->MakeVisible(!isFullscreen); - if (buttonGroup && (buttonGroup->IsVisible() == isFullscreen)) + if (buttonGroup && (bool)buttonGroup->IsVisible() == isFullscreen) buttonGroup->MakeVisible(!isFullscreen); #endif } else if (QApplication::activeWindow() == qwidget->window()) { @@ -925,6 +925,12 @@ void QSymbianControl::HandleResourceChange(int resourceType) { switch (resourceType) { case KInternalStatusPaneChange: + if (qwidget->isFullScreen()) { + SetExtentToWholeScreen(); + } else if (qwidget->isMaximized()) { + TRect r = static_cast<CEikAppUi*>(S60->appUi())->ClientRect(); + SetExtent(r.iTl, r.Size()); + } qwidget->d_func()->setWindowIcon_sys(true); break; case KUidValueCoeFontChangeEvent: @@ -1080,9 +1086,9 @@ void qt_init(QApplicationPrivate * /* priv */, int) // enable focus events - used to re-enable mouse after focus changed between mouse and non mouse app, // and for dimming behind modal windows - S60->windowGroup().EnableFocusChangeEvents(); + S60->windowGroup().EnableFocusChangeEvents(); - //Check if mouse interaction is supported (either EMouse=1 in the HAL, or EMachineUID is one of the phones known to support this) + //Check if mouse interaction is supported (either EMouse=1 in the HAL, or EMachineUID is one of the phones known to support this) const TInt KMachineUidSamsungI8510 = 0x2000C51E; // HAL::Get(HALData::EPen, TInt& result) may set 'result' to 1 on some 3.1 systems (e.g. N95). // But we know that S60 systems below 5.0 did not support touch. @@ -1560,7 +1566,7 @@ int QApplicationPrivate::symbianProcessWsEvent(const TWsEvent *event) } #endif break; - default: + default: break; } |