From 29668bf3ebef803d67aa4e0bff8cc784149996a9 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Tue, 20 Sep 2016 15:48:37 +0200 Subject: Move resizeOverlay() to QQuickPopupPrivate This is a preparation step for making drawers movable. Drawer must be later able to resize the overlay to fit the area of the window that is covered by the drawer. For example, if the Drawer is below the header, it can resize the overlay so that it won't be on top of the header. Change-Id: I2cfd025a31f3a517575f3dbf9b972dcd6957715c Task-number: QTBUG-53168 Task-number: QTBUG-55360 Task-number: QTBUG-53609 Reviewed-by: Mitch Curtis --- src/quicktemplates2/qquickpopup.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/quicktemplates2/qquickpopup.cpp') diff --git a/src/quicktemplates2/qquickpopup.cpp b/src/quicktemplates2/qquickpopup.cpp index d3280040..8c0e5990 100644 --- a/src/quicktemplates2/qquickpopup.cpp +++ b/src/quicktemplates2/qquickpopup.cpp @@ -689,6 +689,16 @@ void QQuickPopupPrivate::reposition() popupItem->setHeight(rect.height()); } +void QQuickPopupPrivate::resizeOverlay() +{ + if (!dimmer) + return; + + qreal w = window ? window->width() : 0; + qreal h = window ? window->height() : 0; + dimmer->setSize(QSizeF(w, h)); +} + void QQuickPopupPositioner::removeAncestorListeners(QQuickItem *item) { if (item == m_parentItem) -- cgit v1.2.3