From ab44729083da2c6a449ea60a59d6465338a0b02b Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 28 Feb 2012 14:58:24 +0100 Subject: [PATCH] sync scene --- declarativeimports/plasmacomponents/fullscreenwindow.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/declarativeimports/plasmacomponents/fullscreenwindow.cpp b/declarativeimports/plasmacomponents/fullscreenwindow.cpp index 486bdbe6e..f1fa80ae5 100644 --- a/declarativeimports/plasmacomponents/fullscreenwindow.cpp +++ b/declarativeimports/plasmacomponents/fullscreenwindow.cpp @@ -259,6 +259,15 @@ void FullScreenWindow::syncMainItemToView() m_mainItem.data()->setProperty("width", m_view->width()); 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