aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates/qquickpopup_p_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Add Popup::marginsJ-P Nurmi2016-01-301-0/+16
| | | | | | | | | | | | Allow specifying margins around the popup that are taken into account while positioning the popup. For example, the Material style draws a drop shadow that goes outside the popups bounds. This allows it to specify margins so that the drop shadow doesn't get clipped. Other use case is to specify the margins so that the popup doesn't overlap with window header or footer. Change-Id: I018d961259fa8b960d86b77de01413eefb75a59b Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Popup: improve positioningJ-P Nurmi2016-01-301-2/+2
| | | | | | | | | | | Don't spend time repositioning while hidden, but make sure to reposition when the popup item is resized, or when the popup itself becomes visible. This fixes the issue that a ComboBox popup wasn't positioned inside the window when shown initially, until the ComboBox itself moved. Change-Id: I1456dc647e35b6eb9ec2c60dbe9bc9229f932e24 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Add Popup::closePolicyJ-P Nurmi2016-01-281-0/+1
| | | | | Change-Id: Ie3d0f50a59aeaab36ec388af897cbf2596269ce3 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Popup: add implicit & content sizesJ-P Nurmi2016-01-231-2/+5
| | | | | | | Behaves the same way than the Pane/Frame/GroupBox container controls. Change-Id: I370f3961b77a363a63a0a64fc629cc5da6dfd53f Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Add Popup::parentJ-P Nurmi2016-01-231-0/+38
| | | | | | | | | | | | | | | The parent defaults to the QML parent object where Popup is declared. Popup::x/y are relative to the parent, and the popup also automatically follows the parent as appropriate. QQuickPopupPositioner has been adapted from Qt Quick Controls 1. It was called QQuickScenePosListener, and it was implemented for the text selection handle popups. ComboBox's popup now follows the control eg. when scrolling, but the below/above positioning feature is temporarily gone missing. It will be restored in a follow up commit. Change-Id: I8a6b58cd74e07f33930abc35d0ab9da056685128 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Forward input events from the internal QQuickPopupItem to QQuickPopupJ-P Nurmi2016-01-221-0/+11
| | | | | | | | | Popup accepts/blocks all input events by default, to avoid them leaking throgh. Subclasses may override the event handlers to implement eg. key navigation (menu). Change-Id: I726b6a3f61a397e4f95d736c6617dd77a35b01dc Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Refactor PopupJ-P Nurmi2016-01-221-1/+43
| | | | | | | | | | | Added relevant properties to make it almost like a Control: x, y, width, height, padding, background... This change makes popup use an internal item where the style/user-supplied contentItem and background are re-parented. This way we can provide a default style (background) for Popup. Change-Id: I3e7933562464c5c852e4ba4bc37d9ac25691c714 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Add QQuickPopup::isComponentComplete()J-P Nurmi2016-01-211-0/+1
| | | | | | | Needed for the next commit. Change-Id: Icb34d6f772dd1ab662b050580aa776fdc78afa49 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Just tidy up QQuickPopup a bitJ-P Nurmi2015-12-191-5/+5
| | | | | Change-Id: Ibc8097299f0796f943682f0c1de628a8da87e430 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Rename Popup transitionsJ-P Nurmi2015-12-191-7/+7
| | | | | | | | | Use Android-inspired enter & exit, which eliminates the need of using a "transition" suffix, and also less prone to appear in auto-completion when new users try to open/show/close/hide popups. Change-Id: I3a448d3e9be33fbfffbf08488858aa63a70233f2 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Rename Panel to PopupJ-P Nurmi2015-12-091-0/+105
Popup is a more descriptive name. Furthermore, this name change opens the door for another type called Pane. It gives the appropriate background color for the current style & theme. Change-Id: Idb91d37e807f62e870b50f0b656e84ee2d43a9fb Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>