aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/material/Menu.qml
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* | Bump the QtQuick import versions in the stylesJ-P Nurmi2016-12-191-1/+1
| | | | | | | | | | | | | | Qt 5.9 == QtQuick 2.9 Change-Id: I7d4f749645011c4e78bdafe80824b83bd166e7c7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Update import versions in src/import/controls - part IIJ-P Nurmi2016-11-231-1/+1
| | | | | | | | | | | | | | The templates imports were missed in fb7c9541, sorry. Change-Id: I9742f1a86b01083ae1b7c6ae48b43098be8385c5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Update import versions in src/import/controlsJ-P Nurmi2016-11-231-3/+3
|/ | | | | Change-Id: Ic6cd0450a13b965578a0ab8f590270f4e52ffca6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Update all QtQuick imports in src/imports/controlsJ-P Nurmi2016-10-041-1/+1
| | | | | | | | | Most were importing 2.6, some 2.4, and some 2.7. Use consistently the latest available Qt Quick version 2.8. This can be easily tracked to the corresponding Qt version. Change-Id: Ic231b3cc0cb5d2d5cf806fe11c4ff3fd557d09e0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Bump up all controls and templates imports to version 2.1J-P Nurmi2016-07-081-4/+4
| | | | | | | | | | | | Controls must import templates version 2.1 in order to "inherit" 1-revisioned properties, methods, and signals. So far, this has been done case by case, but it's less error prone and more clear to change them all. For example, if you ever see a source file pasted/linked somewhere, it's easy to identify the version it belongs to. Change-Id: I41609ec1a22bc05ac3e79f953a147ca42d9e0786 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Material: remove qdoc markersJ-P Nurmi2016-06-081-4/+0
| | | | | | | | | | | | | The original plan was to include the default implementation (of all styles, if we could make the snippets collapsiple) in the customization docs. Since the default implementations tend to include internal types, in the end we went the other way and wrote dedicated example snippets for the customization docs. Therefore these markers no longer server a purpose, but just add unnecessary extra bytes for the QML parser to read. Change-Id: Ic511d7ce7a032429626ee75517d69d21b21412a3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Menu: remove the extra marginsJ-P Nurmi2016-05-111-1/+1
| | | | | | | | | | | | | Since 0935e65, popup margins are negative by default. 0px or larger margins have to be set to keep a popup within the window bounds. In the same change, Menu gained also default margins. This seemed ok with context menus positioned at mouse coordinates, but doesn't look so nice in the Gallery example where the options menu was pushed too far out of top right corner. This change restores the old behavior that menus are kept within the window bounds with 0 margins. Change-Id: Ib728c22ebbdc2b9fa2d402eb4d4a11a638331a02 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Popup: use margins to determine whether to push inside window boundsJ-P Nurmi2016-05-101-0/+1
| | | | | | | | | | | | | | 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>
* Material: remove obsolete imports of QtGraphicalEffectsNikita Krupenko2016-05-061-1/+0
| | | | | | | They are no needed anymore, as shadow implemented by an ElevationEffect. Change-Id: I75deb8fba69c96dfb82fc400ac24da543497a635 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Material: Add proper elevation supportMichael Spencer2016-05-041-6/+6
| | | | | | | | | | | | - Added an ElevationEffect component based on elevation shadows from Angular Material - Use it on Button, ToolBar, ComboBox, Drawer, Pane, Popup, Menu, and Switch - Add an elevation property to the Material attached object - Update the button colors based on the elevation property Change-Id: I5152e1a56bdcb1016cc4f945a16ef510e0cdece6 Task-number: QTBUG-51276 Reviewed-by: Nikita Krupenko <krnekit@gmail.com> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Allow Menu to grow bigger than implicitHeight of the backgroundNikita Krupenko2016-05-041-3/+3
| | | | | | | Also, empty menu has now size of one MenuItem (+ paddings). Change-Id: I5738d1312594941b5c57a02800665caa8a7cfba6 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Material: add top and bottom paddings for MenuNikita Krupenko2016-04-281-0/+3
| | | | | Change-Id: Ie764f7f3efd2bf14ad9156a1bc3d16b9cb8a9278 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* import Qt.labs.controls 1.0 => QtQuick.Controls 2.0J-P Nurmi2016-04-211-2/+2
| | | | | | | | | 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>
* import Qt.labs.templates 1.0 => QtQuick.Templates 2.0J-P Nurmi2016-04-211-1/+1
| | | | | | | | | | | | | | Even though there never was such thing is QtQuick.Templates 1.0, we'll use version 2.0 to keep it in sync with QtQuick.Controls 2.0 (next step). The templates define (and in the future, revision) the API of the controls, so the two must have the same version or it will get messy. Docs and plugins.qmltypes will be updated in follow up commits. Change-Id: Idc2e76f32f348ba35eb4b1fa167c6868300aa910 Task-number: QTBUG-52549 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Controls: update license headersJ-P Nurmi2016-04-141-2/+2
| | | | | | | This file is part of the Qt Quick Controls 2 module of the Qt Toolkit. Change-Id: Ib653135662bfd353a73290539995e8e5be211587 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Material Menu: round cornersJ-P Nurmi2016-01-271-0/+1
| | | | | Change-Id: Iafc571cc2b18a0c68d0cf7fca6d6775062f710f1 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Material: move DropShadows back to layer.effectJ-P Nurmi2016-01-251-11/+4
| | | | | | | | QTBUG-49979 was fixed, so we can switch back to using layer.effect, which typically leads to one less item and much less bindings. Change-Id: I7d1d1462a90c674b5f849134bb6ac8fe6ff0f231 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Add Popup::transformOriginJ-P Nurmi2016-01-251-1/+2
| | | | | Change-Id: I4a52468234f0479c1b8feb102e07686e3235ba3f Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Menu: set implicit size instead of explicit sizeJ-P Nurmi2016-01-231-4/+4
| | | | | Change-Id: I68f25669379043bbe19b61428cd85dba7eb2ae70 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Refactor PopupJ-P Nurmi2016-01-221-18/+24
| | | | | | | | | | | 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>
* Rename Popup transitionsJ-P Nurmi2015-12-191-2/+2
| | | | | | | | | 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>
* Material: show/hide transition for MenuJ-P Nurmi2015-12-181-0/+13
| | | | | Change-Id: I710aa7d12353374b852078379738c755073c5da3 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Material style for MenuJ-P Nurmi2015-12-181-0/+83
Change-Id: Ifb00d1ddfc326cf206f6d1ffd93ccbe248eb5a3d Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>