aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates/qquickmenu_p_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Popup: use available size and paddings from the popup itemJ-P Nurmi2016-02-191-0/+1
| | | | | | | | | | | | | | | | Now that the internal popup item inherits Control, which already provides these features, we may use them directly instead of re-doing them in Popup. NOTE: QQuickMenu code has lots of direct references to the content item, which used to be stored in QQuickPopupPrivate, which is the base class of QQuickMenuPrivate. Now that the content item is stored by QQuickPopupItem instead, the direct references don't work. Thus, as a temporary solution to avoid this patch growing large, we'll store the content item in QQuickMenuPrivate. Change-Id: I80a16d34432131a4326c1b6ae54419470be53f96 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Add QQuickPopup::contentItemChange()J-P Nurmi2016-01-221-2/+2
| | | | | | | | | Works the same way than QQuickControl::contentItemChange(). This is more efficient and correct (in theory, supports changing the content item at run time) than connecting to the contentItemChanged() signal. Change-Id: I09db809760ddf2c7d62cc2937a6b821f0cd4dad7 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Menu: resize menu items to the width of the menuJ-P Nurmi2016-01-211-0/+4
| | | | | | | | ...unless they have explicit width set. Change-Id: I4c3a1f550bd14fa171b693c819a05abab77dbe1a Task-number: QTBUG-50572 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Add title property to MenuBogDan Vatra2016-01-051-0/+1
| | | | | | Task-number: QTBUG-50203 Change-Id: Iad54bfdab06681aabe457d19a26273c3846c44ef Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Replace Q_DECLARE_TYPEINFO(T, Q_COMPLEX_TYPE) by QML_DECLARE_TYPE(T)J-P Nurmi2015-12-211-2/+0
| | | | | | | | | | | Q_COMPLEX_TYPE tells Qt containers that the type has a ctor/dtor and that it may not be moved in memory using memcpy(). QML types are never stored by value in Qt containers (non-copyable QObjects), so the type info declaration is superfluous. QML_DECLARE_TYPE, however, is useful (QTBUG-49920) and consistently used for all QtQuick types. Change-Id: I3bd1718b306fa7af85a623fa7a17e1b9653d2152 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Rename Panel to PopupJ-P Nurmi2015-12-091-2/+2
| | | | | | | | | 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>
* Add MenuMitch Curtis2015-12-021-0/+99
An item-based menu derived from QQuickPanel. Eventually we'd like to make Panel itself a QQuickItem, as it makes both the implementation and the actual usage of Menu a lot easier. Change-Id: Ic1bf2a05ab98d9e17824c402ed8326ef65d26c69 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>