summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJoona Petrell <joona.t.petrell@nokia.com>2010-06-09 11:51:29 +1000
committerJoona Petrell <joona.t.petrell@nokia.com>2010-06-09 13:13:50 +1000
commit5c6501970c7b6805b7edc30f90187700f05d9f15 (patch)
treecbc23e38845e2ae349e3fcae547818998b8b7f43 /tools
parent00b157dc4aad203e78b8e4d821470a1d01a195c0 (diff)
Fix drawing flicker on Qml Viewer startup
Task-number: QTBUG-10251 and QTBUG-11156 Reviewed-by: Martin Jones
Diffstat (limited to 'tools')
-rw-r--r--tools/qml/qmlruntime.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp
index d95bec269d..676881d0ea 100644
--- a/tools/qml/qmlruntime.cpp
+++ b/tools/qml/qmlruntime.cpp
@@ -804,11 +804,11 @@ void QDeclarativeViewer::statusChanged()
tester->executefailure();
if (canvas->status() == QDeclarativeView::Ready) {
- initialSize = canvas->sizeHint();
+ initialSize = canvas->initialSize();
if (canvas->resizeMode() == QDeclarativeView::SizeRootObjectToView) {
- updateSizeHints();
if (!isFullScreen() && !isMaximized()) {
resize(QSize(initialSize.width(), initialSize.height()+menuBarHeight()));
+ updateSizeHints();
}
}
}
@@ -941,7 +941,7 @@ void QDeclarativeViewer::sceneResized(QSize size)
if (canvas->resizeMode() == QDeclarativeView::SizeViewToRootObject) {
updateSizeHints();
}
- }
+ }
}
void QDeclarativeViewer::keyPressEvent(QKeyEvent *event)
@@ -1264,7 +1264,6 @@ void QDeclarativeViewer::updateSizeHints()
setMinimumSize(QSize(0,0));
setMaximumSize(QSize(16777215,16777215));
}
- updateGeometry();
}
void QDeclarativeViewer::registerTypes()