aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickoverlay.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Set explicit cursors on all interactive controlsJ-P Nurmi2017-04-051-0/+3
| | | | | | | | | | | | For example, if you have a floating button on top of a text editor, hovering the button must change the cursor from the editor's ibeam cursor to an arrow cursor. This applies to all interactive controls that call setAcceptedMouseButtons(). If a control blocks mouse events, it should not use some random cursor from another control underneath. Task-number: QTBUG-59629 Change-Id: I8a6ae306bbc76a9b22377361cb19cf9c3a872d31 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Pass a parent to QQmlContextsMitch Curtis2017-03-241-1/+1
| | | | | | | | To avoid crashes in the future. Task-number: QTBUG-59532 Change-Id: Ie81f95939fc5655567f9d987cf040daf3a32df43 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Add "hover support" configure featureJ-P Nurmi2017-02-061-0/+2
| | | | | | | | | | ./configure -no-feature-quicktemplates2-hover [...] Qt Quick Templates 2: Hover support .......................... no Change-Id: I0509a1a9ac3ffe2cbfe4f2016ce0345708860b84 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix build with -no-feature-wheeleventJ-P Nurmi2017-01-311-0/+2
| | | | | Change-Id: I6f40794ae1977d1f23916bff6d0c58d44440fbe5 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Format initializer listsJ-P Nurmi2017-01-191-3/+3
| | | | | | | | Initialize one member per line. Allow empty constructors with one initialized member on a single line. Change-Id: Ie115802561ebd19efd4dacda1fa868b64d279109 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devJ-P Nurmi2017-01-111-1/+1
|\ | | | | | | Change-Id: If797ac58344b20e8de4379343131c097247ba2f2
| * Welcome to 2017J-P Nurmi2017-01-091-1/+1
| | | | | | | | | | Change-Id: If68cff4efacc7dc5719c8b8e61937e85e9076870 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devJ-P Nurmi2016-12-011-5/+12
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/SpinBox.qml src/imports/controls/material/SpinBox.qml src/imports/controls/universal/SpinBox.qml tests/auto/controls/data/tst_swipedelegate.qml Change-Id: Ie1d1f487890f0a9f80a00df5e813e1d2e8303fe5
| * Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-281-5/+12
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/doc/src/qtquickcontrols2-differences.qdoc sync.profile Change-Id: I554c40516030075142f9af1dd5c66fdca2b78b9a
| | * Fix popups to close on click outsidev5.7.1J-P Nurmi2016-10-251-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a popup closes itself on press outside, it accepts the press event so that it doesn't propagate to other popups or the content below. We must make sure that such closing popup does not become the mouse grabber, because it doesn't make sense to route the subsequent mouse events to the popup that was just closed. Change-Id: I80c6e26a1d94aa1526a61862f00af2fd0778aa82 Task-number: QTBUG-56697 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Move QQuickPopupItem out of qquickpopup.*J-P Nurmi2016-10-261-0/+1
|/ / | | | | | | | | | | | | | | | | | | We'll start slowly refactoring all QQuickPopupItem-specific things out of QQuickPopup. In the future the presentation/backend of a popup could be, under certain circumstances, a native menu popup window, for example. Change-Id: I8508da14ab52c65221afc3a9b7f07c371f0416d2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into 5.8J-P Nurmi2016-09-261-3/+14
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: examples/quickcontrols2/gallery/gallery.qrc src/imports/controls/doc/src/qtquickcontrols2-styles.qdoc src/quicktemplates2/qquickstackview_p.cpp src/quicktemplates2/qquickstackview_p_p.h tests/auto/controls/data/tst_stackview.qml Change-Id: If451fe0e5653572d305b4de90a6d5cb878463e8d
| * Fix nested popupsJ-P Nurmi2016-09-231-3/+13
| | | | | | | | | | | | Task-number: QTBUG-56136 Change-Id: I3ed7fae09c342c2c456b94fc0cfed781d8edf6aa Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Fix QQuickOverlay::childMouseEventFilter() to release the grabber popupJ-P Nurmi2016-09-231-0/+1
| | | | | | | | | | | | Change-Id: Id9d844d1fc75f4d254abaf1681747b7b521e881b Task-number: QTBUG-56131 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-221-13/+7
|\| | | | | | | Change-Id: I37aab846346692fd4bff08b0dbab66db3a8e2716
| * Move resizeOverlay() to QQuickPopupPrivateJ-P Nurmi2016-09-211-12/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Drawer: fix drag to close from the outside on touchJ-P Nurmi2016-09-191-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set mouseGrabberPopup in QQuickOverlay::childMouseEventFilter() the same way it is set in QQuickOverlay::mousePressEvent() to ensure that the consequent mouse move events are routed to the appropriate popup. This worked with "genuine" mouse move events that were caught by the same child mouse event filter and that way routed to the appropriate popup, but not with "synthesized" mouse move events that are caught by QQuickOverlay::mousePressEvent() instead. Change-Id: Ic59afd85e55c13ebec482bc4dc534accd1f92b2c Task-number: QTBUG-56010 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into 5.8J-P Nurmi2016-09-141-0/+16
|\| | | | | | | | | | | | | | | Conflicts: src/quicktemplates2/qquicktextarea_p_p.h src/quicktemplates2/qquicktextfield_p_p.h Change-Id: Ie7b4a114ad27a4cad337c91e8ebcf696b0e845d7
| * Fix modal overlays leaking wheel events throughJ-P Nurmi2016-09-131-0/+16
| | | | | | | | | | | | Change-Id: I1a3be5ef02cf73a153cebc030313f892fbb03d9f Task-number: QTBUG-55769 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into 5.8J-P Nurmi2016-09-061-111/+155
|\| | | | | | | Change-Id: Ief98cd56abd13cfa4e30578e150207462a8243b8
| * Fix drawer visibility and overlay event handlingJ-P Nurmi2016-09-061-63/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drawers were visible all the time, lurking at the window edges to be able to catch presses and drag themselves visible when appropriate. This change moves the handling of window edge presses from QQuickDrawer to QQuickOverlay, making it possible to show and hide drawers like any other popups. Instead of having all drawers visible all the time, we just keep QQuickOverlay visible when there are any registered drawers, even hidden ones. Furthermore, this change makes modal popup/drawer background dimming items accept mouse press events just like they accept hover events to ensure that a modal overlay does not leak input events through. When the background dimming of a modal drawer has been dragged over the drag-threshold, the drawer simply steals/grabs mouse to start dragging of the drawer. Task-number: QTBUG-54794 Task-number: QTBUG-54800 Task-number: QTBUG-55022 Task-number: QTBUG-55703 Task-number: QTBUG-55713 Change-Id: I65fb38fcf1466d4e41192c4321d80fb90b49da9a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Remove superfluous QQuickOverlayPrivate::popupsJ-P Nurmi2016-09-051-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | First of all, the name was a bit misleading. It was a list of _visible_ popups. Anyway, it is unnecessary to maintain such list anymore. The only use case for it was to resize the background dimming items of visible popups when the window was resized. For that infrequent desktop -only event, we can fetch the background dimming items from the list of all popups. Change-Id: Ie17db042719d4614189a78a2e5314136ca95df42 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * QQuickOverlay: keep track of all drawersJ-P Nurmi2016-09-051-12/+5
| | | | | | | | | | | | | | | | Required by the subsequent patches. Done separately keep the other patches smaller and easier to review. Change-Id: Id5d13e19f98155cfd3d0474c7d3839808133bab1 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * QQuickOverlay: keep track of all popupsJ-P Nurmi2016-09-051-0/+10
| | | | | | | | | | | | | | | | Required by the subsequent patches. Done separately keep the other patches smaller and easier to review. Change-Id: I60212451cf53443ae7abd58b8eaad94b66984e03 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Make QQuickOverlayPrivate accessible via qquickoverlay_p_p.hJ-P Nurmi2016-09-051-29/+1
| | | | | | | | | | | | | | | | Required by the subsequent patches. Done separately keep the other patches smaller and easier to review. Change-Id: I90ae08ea196354b3db74e2203983ca95733ef0c8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Fix hover event delivery with plain QQuickWindowJ-P Nurmi2016-09-051-9/+16
| | | | | | | | | | | | | | | | | | | | A plain QQuickWindow cannot provide a modal background dimming visual, but we can create a QQuickItem as a fallback to take care of blocking the hover events for modal popups. Change-Id: I3ead985c4e2e030aaf28f1ec6c8a1ae285637819 Task-number: QTBUG-54913 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Use QQuickOverlay with plain QQuickWindowJ-P Nurmi2016-09-051-1/+27
| | | | | | | | | | | | | | | | | | | | | | Get rid of the ugly and broken event filter approach that was used with QQuickWindow. Create an instance of QQuickOverlay so that the same overlay code path is used for both QQuickApplicationWindow and plain QQuickWindow. Task-number: QTBUG-55729 Change-Id: I6e26b19cd94a9580418912803f50c30b9dcaeedb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Make QQuickOverlay resize itselfJ-P Nurmi2016-09-051-1/+21
|/ | | | | | | | This prepares QQuickOverlay to be usable with a plain QQuickWindow, for which we cannot override resizeEvent(). Change-Id: Ib021c510539b134477bb8d532787721a5ac7fca4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Popup: respect dynamic dim & modal changesJ-P Nurmi2016-09-021-1/+18
| | | | | | | | | | | | | What comes to the visual background dimming, popups did not respect dynamic 'dim' or 'modal' property changes. This was half-intentional, because it was thought an unrealistic use-case to toggle these while the popup is visible. As a result, the background dimming was missing if a popup was made visible in a declarative way, and either 'dim' or 'modal' was evaluated after the popup was already visible. Task-number: QTBUG-54797 Change-Id: Icfb171e619540fef2d91908867b702790cde6c32 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix popups to appear above QtQuick.Dialogs 1.xJ-P Nurmi2016-08-101-0/+1
| | | | | | | | | | | | | | When using a plain QML Window, the Z-value of the popup item must be higher than the Z-value of the DefaultWindowDecoration in QtQuick.Dialogs 1.x. When using an ApplicationWindow, the same applies to the window overlay. NOTE: The correct Z-value of DefaultWindowDecoration is 1000000, not 10000! (qtquickcontrols/src/dialogs/qml/DefaultWindowDecoration.qml) Task-number: QTBUG-55004 Change-Id: Ib5d068ee2c633884f95ba519f77b6ec082220461 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix overlay event processing order for popupsJ-P Nurmi2016-07-221-14/+34
| | | | | | | It should follow the stacking order of popups. Change-Id: Id5664496c60e99bdf0aa4b2dc6a2c94dba2c756a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix hover event handling for drawer overlaysJ-P Nurmi2016-07-221-1/+1
| | | | | | | | | | Closed drawers sit visible at the window edge to be able to pull them out. Don't block hover events when drawers are fully closed ie. when their overlays are fully translucent. Task-number: QTBUG-53419 Change-Id: I5bdbed5a2cf3ad6972634432ac79f7fbe5054b98 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Don't leak hover events through modal overlaysJ-P Nurmi2016-07-221-0/+6
| | | | | | Task-number: QTBUG-53419 Change-Id: I5c1ce684cff7954f9c011e991e3924741ad44367 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Popups: fix overlay visibilityJ-P Nurmi2016-07-221-17/+4
| | | | | | | | | | Make sure popup overlay dimmers gets destroyed when popups are closed, and thus, re-parented out of the window overlay. The window overlay item is hidden when there are no child items, so this fixes the issue that the window overlay item was left visible after closing popups. Change-Id: Id2ffe43b706ffcc5cda83abd75354ef04f893745 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Make Overlay.modal and modeless ComponentsJ-P Nurmi2016-05-231-85/+68
| | | | | | | | | | | | | | | | 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>
* Popup: respect "dim: false" for modal popupsJ-P Nurmi2016-05-121-7/+10
| | | | | | Task-number: QTBUG-53309 Change-Id: I024dfa32342a7c936f5ea53586c11e50d65845e9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix overlay stacking order for multiple modal popupsNikita Krupenko2016-05-091-4/+2
| | | | | | | | This needed when using multiple drawers in application. Task-number: QTBUG-53066 Change-Id: I81dbaeb2b974dc18a66bac2cee6b07516eb97a23 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Fix overlay stacking orderJ-P Nurmi2016-05-031-8/+38
| | | | | | Task-number: QTBUG-53066 Change-Id: I552ee6e18e3f6a71c05ff3887a85501bbb6eebc7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Popup: separate modal and modeless background dimmingJ-P Nurmi2016-04-271-33/+75
| | | | | | | | | | iOS generally has white popups on white background, so it must dim the overlay background also for modeless popups to make them stand out. Make it possible to have modal and modeless background dimming separately, because both might be visible at the same time (eg. in Gallery settings). Change-Id: Id990675c8d06ceb8f8a26e6505d4bd020069f297 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Templates: update license headersJ-P Nurmi2016-04-141-2/+2
| | | | | | | This file is part of the Qt Quick Templates 2 module of the Qt Toolkit. Change-Id: I39ef9cbb00f55a32b7a43f11ffbdfbb40b84e124 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Templates: rename the C++ module to qtquicktemplates2J-P Nurmi2016-04-131-0/+274
Change-Id: I146da903b46f5c2caf865e37291c25376b49021a Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>