diff options
author | Joona Petrell <joona.t.petrell@nokia.com> | 2010-06-09 01:51:29 (GMT) |
---|---|---|
committer | Joona Petrell <joona.t.petrell@nokia.com> | 2010-06-09 03:13:50 (GMT) |
commit | 5c6501970c7b6805b7edc30f90187700f05d9f15 (patch) | |
tree | cbc23e38845e2ae349e3fcae547818998b8b7f43 /tools/qml | |
parent | 00b157dc4aad203e78b8e4d821470a1d01a195c0 (diff) | |
download | Qt-5c6501970c7b6805b7edc30f90187700f05d9f15.zip Qt-5c6501970c7b6805b7edc30f90187700f05d9f15.tar.gz Qt-5c6501970c7b6805b7edc30f90187700f05d9f15.tar.bz2 |
Fix drawing flicker on Qml Viewer startup
Task-number: QTBUG-10251 and QTBUG-11156
Reviewed-by: Martin Jones
Diffstat (limited to 'tools/qml')
-rw-r--r-- | tools/qml/qmlruntime.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp index d95bec2..676881d 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() |