sync scene

This commit is contained in:
Marco Martin 2012-02-28 14:58:24 +01:00
parent 07b7041b92
commit ab44729083

View File

@ -259,6 +259,15 @@ void FullScreenWindow::syncMainItemToView()
m_mainItem.data()->setProperty("width", m_view->width()); m_mainItem.data()->setProperty("width", m_view->width());
m_mainItem.data()->setProperty("height", m_view->height()); m_mainItem.data()->setProperty("height", m_view->height());
if (m_declarativeItemContainer) {
m_view->resize(m_declarativeItemContainer->size().toSize());
m_view->setSceneRect(m_declarativeItemContainer->geometry());
} else {
QRectF itemGeometry(QPointF(m_mainItem.data()->x(), m_mainItem.data()->y()),
QSizeF(m_mainItem.data()->boundingRect().size()));
m_view->setSceneRect(itemGeometry);
}
} }
bool FullScreenWindow::isVisible() const bool FullScreenWindow::isVisible() const