aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickpopup.cpp
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-09-20 15:48:37 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-09-21 21:39:22 +0000
commit29668bf3ebef803d67aa4e0bff8cc784149996a9 (patch)
tree033cae0028ffd2dc4357bd5b43781fbd1c8181c1 /src/quicktemplates2/qquickpopup.cpp
parent85230f227f38d56572ad4650dda9fcce3942f86d (diff)
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 <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickpopup.cpp')
-rw-r--r--src/quicktemplates2/qquickpopup.cpp10
1 files changed, 10 insertions, 0 deletions
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)