diff options
-rw-r--r-- | src/declarative/util/qdeclarativeview.cpp | 1 | ||||
-rw-r--r-- | tools/qml/qmlruntime.cpp | 33 |
2 files changed, 17 insertions, 17 deletions
diff --git a/src/declarative/util/qdeclarativeview.cpp b/src/declarative/util/qdeclarativeview.cpp index 138fe3c..22a7873 100644 --- a/src/declarative/util/qdeclarativeview.cpp +++ b/src/declarative/util/qdeclarativeview.cpp @@ -157,6 +157,7 @@ void QDeclarativeViewPrivate::execute() { delete root; delete component; + initialSize = QSize(); component = new QDeclarativeComponent(&engine, source, q); if (!component->isLoading()) { diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp index d4ceb0b..44cab97 100644 --- a/tools/qml/qmlruntime.cpp +++ b/tools/qml/qmlruntime.cpp @@ -995,8 +995,22 @@ void QDeclarativeViewer::statusChanged() if (canvas->status() == QDeclarativeView::Error && tester) tester->executefailure(); - if (canvas->status() == QDeclarativeView::Ready) - resize(sizeHint()); + if (canvas->status() == QDeclarativeView::Ready) { + if (!skin) { + canvas->updateGeometry(); + if (mb) + mb->updateGeometry(); + if (!isFullScreen() && !isMaximized()) + resize(sizeHint()); + } else { + if (scaleSkin) + canvas->resize(canvas->sizeHint()); + else { + canvas->setFixedSize(skin->standardScreenSize()); + canvas->resize(skin->standardScreenSize()); + } + } + } } void QDeclarativeViewer::launch(const QString& file_or_url) @@ -1077,21 +1091,6 @@ void QDeclarativeViewer::openQml(const QString& file_or_url) qWarning() << "Wall startup time:" << t.elapsed(); - if (!skin) { - canvas->updateGeometry(); - if (mb) - mb->updateGeometry(); - if (!isFullScreen() && !isMaximized()) - resize(sizeHint()); - } else { - if (scaleSkin) - canvas->resize(canvas->sizeHint()); - else { - canvas->setFixedSize(skin->standardScreenSize()); - canvas->resize(skin->standardScreenSize()); - } - } - #ifdef QTOPIA show(); #endif |