diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-05-20 15:23:05 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-05-23 14:17:19 +0000 |
commit | 93cd723a4a6f479909f9ad89f67b0537874f626f (patch) | |
tree | 1e8a61c52c3c5512d00803dae3bb04b58a86bd60 /src/quicktemplates2/qquickapplicationwindow.cpp | |
parent | 0bd08232c5034aec06d5c6554a74c84cb79e53f6 (diff) |
Make Overlay.modal and modeless Components
This way we can simply instantiate a visual overlay for each modal or
dimming popup without having tricky problems with overlay's stacking
order. It makes also sense to not instantiate the overlays for hidden
popups.
Coincidentally, this change also fixes a problem that the overlay
turned out to be _always_ visible since a hidden overlay background
was always instantiated no matter if there were open popups, or
popups at all.
Change-Id: Ieb64a72c827d0a005418027428378ebe04f41117
Task-number: QTBUG-53519
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickapplicationwindow.cpp')
-rw-r--r-- | src/quicktemplates2/qquickapplicationwindow.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/quicktemplates2/qquickapplicationwindow.cpp b/src/quicktemplates2/qquickapplicationwindow.cpp index 940e5eeb..6f070ab7 100644 --- a/src/quicktemplates2/qquickapplicationwindow.cpp +++ b/src/quicktemplates2/qquickapplicationwindow.cpp @@ -454,8 +454,8 @@ QQuickItem *QQuickApplicationWindow::activeFocusControl() const /*! \qmlpropertygroup QtQuick.Controls::ApplicationWindow::overlay \qmlproperty Item QtQuick.Controls::ApplicationWindow::overlay - \qmlproperty Item QtQuick.Controls::ApplicationWindow::overlay.modal - \qmlproperty Item QtQuick.Controls::ApplicationWindow::overlay.modeless + \qmlproperty Component QtQuick.Controls::ApplicationWindow::overlay.modal + \qmlproperty Component QtQuick.Controls::ApplicationWindow::overlay.modeless This property holds the window overlay item. Popups are automatically reparented to the overlay. @@ -466,15 +466,14 @@ QQuickItem *QQuickApplicationWindow::activeFocusControl() const \li Description \row \li overlay.modal - \li This property holds a visual item that implements background - dimming for modal popups. It is stacked below the top-most open - modal popup, or hidden when there are no modal popups open. + \li This property holds a component to use as a visual item that implements + background dimming for modal popups. It is created for and stacked below + visible modal popups. \row \li overlay.modeless - \li This property holds a visual item that implements background - dimming for modeless popups. It is stacked below the top-most - open modeless dimming popup, or hidden when there are no modeless - dimming popups open. + \li This property holds a component to use as a visual item that implements + background dimming for modeless popups. It is created for and stacked below + visible dimming popups. \endtable \sa Popup::modal, Popup::dim |