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