summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authormread <qt-info@nokia.com>2011-12-02 11:44:56 (GMT)
committermread <qt-info@nokia.com>2011-12-02 12:53:58 (GMT)
commit1c9d051399c683bf89dfd1bca54bc3c48d534087 (patch)
treee628e11b5806294492bf8aef62b9eaeef83dd421 /src/gui
parent1affc6720a338f59b824af1825936335e7ce1602 (diff)
downloadQt-1c9d051399c683bf89dfd1bca54bc3c48d534087.zip
Qt-1c9d051399c683bf89dfd1bca54bc3c48d534087.tar.gz
Qt-1c9d051399c683bf89dfd1bca54bc3c48d534087.tar.bz2
Correct client rect calculation for MCL
The clientRect calculation was adjusting the rectangle for the status pane. But this is now taken into account in the rectangle from Avkon, so we do not need to adjust when the status pane is there. However Avkon is supplying an inconsistent clientRect depending on whether we have all Avkon panes disabled (status pane and CBAs). When enabled, Avkon takes the splitview keyboard off the clientRect space, when disabled, Avkon ignores the splitview keyboard. Since we want to ignore the splitview keyboard effect on the clientRect, we only adjust when the Avkon panes are enabled. This has been tested with splitview keyboard, orientation change and debug output of the client rectangle returned in the following situations: - Normal app with status pane and CBA - App with CBA but invisible status pane - App with status pane and CBA disabled Task-number: ou1cimx1#938780 Reviewed-by: Miikka Heikkinen
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qapplication_s60.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index c94d66d..587c0f2 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -273,19 +273,16 @@ void QS60Data::controlVisibilityChanged(CCoeControl *control, bool visible)
TRect QS60Data::clientRect()
{
TRect r = static_cast<CEikAppUi*>(S60->appUi())->ClientRect();
- if (S60->partialKeyboardOpen) {
- // Adjust client rect when splitview is open, since for some curious reason
- // native side insists that clientRect starts from (0,0) even though status
- // pane might be visible.
+ if (S60->partialKeyboardOpen && !QApplication::testAttribute(Qt::AA_S60DontConstructApplicationPanes)) {
+ // Adjust client rect when splitview is open
+ // We want it to take the client rect space as if the splitview keyboard was not there
TRect statusPaneRect;
TRect mainRect;
AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EStatusPane, statusPaneRect);
AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, mainRect);
int clientAreaHeight = mainRect.Height();
CEikStatusPane *const s = S60->statusPane();
- if (s && s->IsVisible())
- r.Move(0, statusPaneRect.Height());
- else
+ if (!(s && s->IsVisible()))
clientAreaHeight += statusPaneRect.Height();
r.SetHeight(clientAreaHeight);
}