aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickpopup.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Doc: add missing \since 5.7 tagsJ-P Nurmi2016-05-251-0/+1
| | | | | Change-Id: Ie4680c5dfadc95278215b688f4fc28577f557933 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Add missing QQuickPopup::forceActiveFocus()J-P Nurmi2016-05-231-0/+16
| | | | | | Change-Id: I06da62fa3804ee9d67bfb3feb8a11faa1fd3850e Task-number: QTBUG-53519 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Make Overlay.modal and modeless ComponentsJ-P Nurmi2016-05-231-0/+1
| | | | | | | | | | | | | | | | 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>
* Don't restore focus to contentItem when a focusless popup was closedMitch Curtis2016-05-191-6/+14
| | | | | | | | | For example, a ToolTip shouldn't affect focus when it closes. Task-number: QTBUG-53420 Task-number: QTBUG-53451 Change-Id: Ic945e98a2ffd86e9f9f06724b16e5f240c3f94de Reviewed-by: Liang Qi <liang.qi@qt.io>
* Popup: don't ignore Back keyNikita Krupenko2016-05-181-1/+1
| | | | | | | | | This allows to close popup on mobile device when Back key pressed and CloseOnEscape policy is set. Change-Id: I97e863b462ee50d2d8e79d18cf8097f960f14227 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Popup: restore original size on reposition if appropriateNikita Krupenko2016-05-181-0/+10
| | | | | | | | | | | | | | When popup need to reposition (for example, on screen orientation change), it's resized to fit into window bounds. But if the implicit size of it's content changed to accommodate window geometry, popup wouldn't change it's size back. This commit allow to change popup size when implicit width of the content changed and new size could fit into window bounds. Task-number: QTBUG-52729 Change-Id: I5a265b55e24495be9c1f2050cdcceddcdeb57974 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* QQuickPopup: cleanup window usageJ-P Nurmi2016-05-121-13/+7
| | | | | | | | | The window pointer is stored as a member variable in QQuickPopupPrivate since 10d3752. Change-Id: I9f73db5bbcdb0c1fcbae556db57a6a94067ce98a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io>
* QQuickPopup: don't reposition when hiddenJ-P Nurmi2016-05-121-0/+3
| | | | | | | Avoid some unnecessary calculations and coordinate mappings. Change-Id: I98fd79b2a743b055b55086a2bdf1483a4ff19c2a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Popup: restore focus to contentItem of ApplicationWindow when closingMitch Curtis2016-05-111-0/+6
| | | | | | | | | In Controls2, Popup and normal content are in same window, then we should maintain the focus restore work. Task-number: QTBUG-53275 Change-Id: I57f5aaf3febf1b7d2071c1734d8561932f95c699 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* QQuickPopup: emit xChanged() and yChanged() when _local_ coords changeJ-P Nurmi2016-05-111-10/+18
| | | | | | | | | | | Emitting xChanged() and yChanged() when the (scene) geometry of the internal popup item changes is not sufficient, because QQuickPopup operates in the parent item's coordinate space. When a popup is pushed inside the window margins, the local coordinates change, but the global coordinates don't. Change-Id: I296f1ecd1d1e882c2ff730a2bf68641bd57cbb4f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickPopup: align position accessors with x/y accessorsJ-P Nurmi2016-05-111-32/+15
| | | | | Change-Id: Ib3db04d9d1395f33bf9c8d83f69d7f24a3e380b9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Popup: use margins to determine whether to push inside window boundsJ-P Nurmi2016-05-101-61/+70
| | | | | | | | | | | | | | Previously, we were planning to introduce complex policy flags to make it possible to specify whether a Popup is allowed to go outside the screen or not. Using margins for that purpose avoids the need of introducing such dedicated API just for that. From now on, margins are used to determine whether a popup is pushed to fit inside the window bounds (margins removed), and implicit size is used to determined whether a popup is resized to fit inside the window. In other words, a popup with negative margins and no implicit size is allowed to move outside the window bounds. Change-Id: Ife1665755e4dae434751977ae3289eb1aa4f3c6d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Popup: make x() and y() return the effective coordinatesJ-P Nurmi2016-05-091-4/+16
| | | | | | | | | And trigger change signals appropriately. This makes it possible for the iOS style to know where the ComboBox popup is actually positioned so it can visualize the popup curve appropriately. Change-Id: I6cec6cbf220736c658357aee10f6d31e08531ba2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix accessibilityJ-P Nurmi2016-05-031-0/+3
| | | | | | | | | Add missing componentComplete() -> accessibilityActiveChanged(true) calls to QQuickTextField, QQuickTextArea, and QQuickPopup. Task-number: QTBUG-53157 Change-Id: I0e79d7f1412c24f4d129c58ba1e7edf20b8d8ecf Reviewed-by: Liang Qi <liang.qi@qt.io>
* QQuickPopup: listen to parent item's window changesJ-P Nurmi2016-05-031-6/+16
| | | | | | | | | Emitting windowChanged() only in setParentItem() is unreliable, because the item might not yet have a window. Therefore we must listen to the parent item's windowChanged() signal. Change-Id: I237f81e0b06319516428c3c5d42352b228e753f5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Popup: emit opened() when fully openedJ-P Nurmi2016-04-291-1/+2
| | | | | | | | | | | Opening sequence: aboutToShow() -> visibleChanged() -> enter transition -> opened() Closing sequence: aboutToHide() -> exit transition -> visibleChanged() -> closed() Change-Id: If1a97f0d3cbc1dad0e1b1ceade4b807a9bff122e Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Popup: separate modal and modeless background dimmingJ-P Nurmi2016-04-271-0/+45
| | | | | | | | | | 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>
* Promote QQuickToolTip's repositioning code to QQuickPopupJ-P Nurmi2016-04-251-18/+59
| | | | | | | | | | | | | | QQuickToolTip already had repositioning implemented for both horizontal and vertical directions. Promote that code up to QQuickPopup so that QQuickMenu gets properly repositioned when used as a context menu. As special cases, QQuickComboBox enables vertical flipping for its popup, and QQuickToolTip enables both. In the QQuickPopup base class, both are disabled by default. Task-number: QTBUG-52608 Change-Id: Ia8f835321222d4841a6f79434822b33f057d13fc Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Doc: add "Popup Controls" group pageJ-P Nurmi2016-04-251-0/+2
| | | | | Change-Id: I863b49f9dad875922a3a4262881e6cd8a32f4b18 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Doc: cleanup remaining "labs" referencesJ-P Nurmi2016-04-211-4/+2
| | | | | Change-Id: I5b0015476c3ceef8f82b00d99b084b1ce3bfaa6f Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Doc: rename Qt.labs.controls 1.0 to QtQuick.Controls 2.0J-P Nurmi2016-04-211-42/+42
| | | | | | Change-Id: Id6c476424fa359d222f027584278346fc0984069 Task-number: QTBUG-52549 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* import Qt.labs.controls 1.0 => QtQuick.Controls 2.0J-P Nurmi2016-04-211-1/+1
| | | | | | | | | Docs, resources, .metainfo and plugins.qmltypes will be updated in follow up commits. Change-Id: I4438c5bfb8802bff0fa15c56431cfd288f179861 Task-number: QTBUG-52549 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Popup: rename close policy flagsJ-P Nurmi2016-04-201-11/+11
| | | | | | | | | | | Even though it gets a bit long, it's much easier to remember close policy values that start with "Close". Even with auto-completion, one still has to type something for Qt Creator to know what to complete. That's where consistency (closePolicy -> CloseFoo, snapMode -> SnapBar) helps. Change-Id: Idc86322c0d1e367fad87eb1deafbf58ef6ddb04d Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Popup: add opened() and closed() signals.Mitch Curtis2016-04-201-0/+18
| | | | | | | The only alternative at the moment is to use onVisibleChanged. Change-Id: Ica56a30cc9895681005be0bad7b19fd205b79232 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* 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>
* Doc: add 2-suffix to the image assets and snippetsJ-P Nurmi2016-04-131-1/+1
| | | | | Change-Id: Ib8050cb3baefe07d28c7e2dcec64af155d2d7c9b Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Templates: rename the C++ module to qtquicktemplates2J-P Nurmi2016-04-131-0/+1851
Change-Id: I146da903b46f5c2caf865e37291c25376b49021a Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>