summaryrefslogtreecommitdiff
path: root/src/controls/MenuBar.qml
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.5' into 5.6.0Liang Qi2016-01-301-0/+2
|\ | | | | | | Change-Id: Ideb3ff546c83f52df6fa6a61fa7f91c628c43021
| * Fixed key event propagation with submenusFilippo Cucchetto2016-01-291-0/+2
| | | | | | | | | | | | | | | | | | When a menu receive a Key_Right event and its subMenu popupwindow is already visible, the event should be discarded. In this way the event can forwarded up to the menubar for moving to the next root menu. Change-Id: Ifeb402f66fdac9fcf3a541456b929d11d36ad00d Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into 5.6Simon Hausmann2015-10-021-37/+44
|\ \ | |/ | | | | Change-Id: Ie26c941c33fdd8baab49dc13b84d02e2b83af5e1
| * Menus: Clean popup hide and destroy logicGabriel de Dietrich2015-10-011-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a menu popup gets closed it usually needs to be destroyed right away since we don't recycle its contents. There is an exception, however, and it's when he user triggers a menu item. In this case, we need to proceed in three steps. First, we hide the menu popup, then we emit the triggered signal, and when that one returns, the menu contents can be disposed. If we did all in a single step, we may end up with a crash since we don't support deleting a QtQuick item while it's running a signal handler. Delayed deletions don't work either in the case when the triggered handler ends up running the event loop. Task-number: QTBUG-45182 Task-number: QTBUG-47682 Task-number: QTBUG-48382 Change-Id: Ic39717e09f38df602f641250cd81cf4931863db6 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
| * MenuBar: Refactor logic for setting the current menuGabriel de Dietrich2015-10-011-36/+45
| | | | | | | | | | | | | | | | | | | | Among other things, we removed one connection object per menu delegate. We also made the logic more predictable and less dependent on property changes order. Task-number: QTBUG-48382 Change-Id: Ic97a7bf9c4ac8ff07f98bdd4a420e19bd228a6f1 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
| * Menu: Schedule popup deletion when it's about to hideGabriel de Dietrich2015-09-111-1/+1
| | | | | | | | | | | | | | | | | | | | This leads to serious memory/OpenGL context leaks on Windows. No such thing has been noticed on Linux which may hint to differences in the backend. Task-number: QTBUG-47682 Change-Id: I274ed98db348ffe2c78707f2c92b812f272c2723 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | Doc: Create proper QHP TOC entries for QML types, examples and tutorialsTopi Reinio2015-08-051-0/+1
|/ | | | | | | | | | QDoc now supports using a \group name as a selector for QHP subprojects. Use this to have the correct division of Qt Quick Controls and Controls Styles QML types, as well as a TOC entry for examples and tutorials. Change-Id: I8e4b44c8876fd6bb3b2baebd956d6dc5d5223715 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Make MenuBar, Menu properly accessibleGabriel de Dietrich2015-07-151-0/+6
| | | | | | | | Previously, we had the accessibility settings in the desktop style (only!). Now it's been moved into the actual control implementation. Change-Id: Idb90d164dfd7a72c8188accd9e4fa3b02d567a94 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* Revert "iOS: Make ApplicationWindow fill entire screen, including under ↵J-P Nurmi2015-05-261-10/+3
| | | | | | | | | | | | | | | | statusbar" This is a nice to have iOS feature, but it breaks all the other platforms. This reverts commit 10a57f37d0f03e8642a7c92dcacf287c95777342. Change-Id: Iec7cfa8be1bb214d0f86047826a5c0cdcf447c1e Task-number: QTBUG-45973 Task-number: QTBUG-46119 Task-number: QTBUG-46134 Task-number: QTBUG-46180 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-04-151-4/+5
|\ | | | | | | | | | | | | Conflicts: src/controls/qquickmenupopupwindow_p.h Change-Id: Ic935bb56f5df70645eea30c890759f5980d68fe4
| * Menu: Separate dismiss and destroy actionsGabriel de Dietrich2015-03-271-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids issues when the action is triggered from a Menu and the slot ends up processing pending events, effectively deleting an object while one of its QML signal handlers is being executed. The reason being that we used to call deleteLater() on the menu popup window while still in the mouse event handler. Now, we do the same thing in three separate steps. 1. Close/dismiss the menu popups, 2. trigger the action, and 3. delete the popups. This keeps the menu popups and their contents alive until we return from the action triggered handler. We also need to take care of manually destroying any popup we may create. Finally, the menu content creation in Menu.qml had to be tweaked since we shouldn't rely on the popup visibility anymore. Task-number: QTBUG-45182 Change-Id: I9f1155bbf74dd3353c6c4066a24abf1cd2c3a283 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
| * Menus: Ignore non-visible menu popups on key navigationGabriel de Dietrich2015-03-241-2/+2
| | | | | | | | | | Change-Id: Ie9fce58dd6481a66539bfe6c24487d7c630a583f Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | iOS: Make ApplicationWindow fill entire screen, including under statusbarTor Arne Vestbø2015-03-271-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We take advantage of the new Qt::WindowFlag that asks the OS to maximize the window using as much as possible of the available screen geometry, and then make sure that the contentItem is shifted accordingly so that it doesn't end up under the statusbar. This allow setting a custom background image/color on the application window, or adding toolbars or menu bars that underlay the iOS system status bar. Change-Id: I6efab2aced7efd274a65f2524ae8c270d20de187 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
* | Doc: Fix qtdoc warningsCaroline Chao2015-03-061-0/+7
| | | | | | | | | | | | | | | | | | Mostly link errors and missing documentation. And removed useless references to {QtQuick.Controls.Styles} in the doc. Change-Id: Iad211a574c0bd23c84e067e0cbcc18c3e719cde7 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Merge Extras' styling system into Controls'.Mitch Curtis2015-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Removes the duplicated style settings functionality in Extras and simplifies the installed styles directory structure. - Extras' Base style is now part of Controls' Base style, eliminating the need for a separate QtQuick.Extras.Styles import. The cost of doing this should be negligible: a few QML files and two images. If we didn't merge Extras' Baste style into Controls', we'd need extras-specific code in qquickcontrolssettings, as the default style search path is: qml/QtQuick/Controls/Styles/ Whereas the Extras Base style would be in: qml/QtQuick/Extras/Styles/ The Extras Base style can't go into Controls' Base style directory, either, because otherwise we'd have two qmldir files there. The Flat style doesn't have this problem because it is all contained in one plugin and gets installed into its own Flat/ folder. - Documentation now lists the Extras controls as \since QtQuick.Extras 1.4. - Adds the customcontrolsstyle auto test to ensure that custom styling is tested. Change-Id: I19ca7a8b7e1c1daa85b272f4ccf9a2f05c76e0d9 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devJ-P Nurmi2015-02-121-1/+1
|\ \ | |/ | | | | | | | | | | | | Conflicts: src/controls/TableView.qml tests/auto/controls/data/tst_gridlayout.qml Change-Id: I030bc50dc8fcf7b6b00e183dc3a67c3cd012f3fb
| * Disable hover on touchJ-P Nurmi2015-02-041-1/+1
| | | | | | | | | | | | Task-number: QTBUG-44267 Change-Id: I467f08ae6c5264b7e858022af9ff293117434018 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
* | Controls: update license headersJ-P Nurmi2015-02-111-28/+24
|/ | | | | | | Change-Id: I77e7a218a958d76ac7ef7780f4be52a81f76fa6b Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* qquickmenu: add support for providing a target rect to __popup()Richard Moe Gustavsen2014-09-301-2/+2
| | | | | | | | | | | | | | | | | Using a target rect as menu location instead of a position has been supported in QPlatformMenu for a while. The reason for specifying a rect instead of a position is that then the OS can decide if the popup should be placed above or below the target rect so that it fits inside the screen. A typical example is when showing an edit menu around a text selection. If the selection (target rectangle) is far up on the screen, the popup (with arrow) will be placed below the selection instead of above, which is the normal. Change-Id: Ie6cd6a92f1d9ef480c1e455960021c7f18f86569 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Let MenuBarStyle control the widthJ-P Nurmi2014-09-151-2/+2
| | | | | Change-Id: Idebef026691acb904be760d384746f3fb8a32e78 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Let MenuBarStyle control whether a native menubar is usedJ-P Nurmi2014-09-151-11/+16
| | | | | Change-Id: I1daecf82421ffa330d050430d6e54e4cc0122913 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Let ApplicationWindowStyle provide the layoutJ-P Nurmi2014-09-101-0/+1
| | | | | | | Change-Id: Ic14c153d57857efb5ad26e01f58ff3363b189b85 Reviewed-by: Jochen Seemann <seemann.jochen@gmail.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Doc: Added images and missing snippetsVenu2014-06-271-11/+19
| | | | | | Task-number: QTBUG-33799 Change-Id: I582518a73276d47cf63cf31411b5176a90acab6f Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Menu: Don't open disabled submenusGabriel de Dietrich2014-06-121-4/+16
| | | | | | Task-number: QTBUG-39384 Change-Id: I5310c6efb0a7045f6f89c6347551a0043d8e0ca6 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Fix left/right cursor keys in TextAreaBerthold Krevert2014-04-091-0/+4
| | | | | | | | | Since commit 5dc805c86077e key events for left/right cursor get eaten by the MenuBar. That means, the events shouldn't be accepted if no menu is shown. Change-Id: Icc249a3c4d96e19e8c902276938a2972cf1364d9 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Bump QtQuick.Controls import version to 1.2J-P Nurmi2014-04-071-1/+1
| | | | | Change-Id: Idc0b93cbfc2fe23e8be3bcaece672d06555a81f6 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Import QtQuick 2.2J-P Nurmi2014-04-071-1/+1
| | | | | Change-Id: Ifc9719ec6fbbd80b866c01eebc471d0ed121bd16 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Introducing styling for Menu, MenuBarGabriel de Dietrich2014-02-141-113/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | MenuStyle We expose the frame and item properties together with some convenience properties (basically color related). The menu item data is exposed via a styleData object, similarly to what's done in TabViewStyle. In addition, we introduce MenuStyle.menuItem which brings some convenience when it comes to overriding subcontrols of the menu item. MenuBarStyle We expose background and menuBarItem. The menubar item's properties are accessible through the styleData property in scope. Style cascading Additionally, MenuBarStyle has a menuStyle property that will apply to all its menus and their submenus. Similarly, assigning a style to a Menu object, will apply it to its submenus. It's still possible to override the parent menu's style by declaring its own. [ChangeLog][QtQuickControls][Styles]Menu and MenuBar are now styleable Change-Id: Ib724b7a6426bdfce5da314620d51dfaa76f76500 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Doc: Changed the \since argument to the Qt version.Jerome Pasion2013-09-261-1/+1
| | | | | | | | | | | | | | -1.0 types were introduced in Qt 5.1 -1.1 types were introduced in Qt 5.2 -The module versions are now taken from the \qmlmodule This change was only applied to \qmltype. For methods, signals, and properties, we keep the \since QtQuick.Controls <version> Task-number: QTBUG-32172 Change-Id: Iefa73d4a489aa285bae873f68ae9a228030f0115 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Merge branch 'stable' into devGabriel de Dietrich2013-09-181-3/+59
|\ | | | | | | | | | | | | Conflicts: src/controls/qquickaction.cpp Change-Id: I85255ba5c27c0d8ea023d0867e5963d43f8f1ddb
| * Menu: Enable mnemonic menu navigationGabriel de Dietrich2013-09-131-3/+59
| | | | | | | | | | | | | | | | | | | | | | We also added a new mnemonic specific shortcut context matcher. This prevents two menu items with the same mnemonic but within different menus to be reported as ambiguous. Task-number: QTBUG-33030 ChangeLog: Added mnemonic navigation for menus Change-Id: I192c9aacba4d15851fe65bf9201251962fe976d5 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Update imports to 1.1 and remove version from qmlmodule definitionJens Bache-Wiig2013-09-101-3/+3
| | | | | | | | | | Change-Id: Icb4c6d78225c072da787e4646a55d8cf71a5db7a Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devJ-P Nurmi2013-08-201-0/+1
|\ \ | |/ | | | | Change-Id: I97e6044a5d28ab875628e61ea67474f3c0a4ef4b
| * MenuBar: Make sure invisible menus appear soGabriel de Dietrich2013-08-131-0/+1
| | | | | | | | | | | | | | Task-number: QTBUG-32899 Change-Id: Id07baba90ff45ba420d563ce47ee58964d4e4d02 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | Menus: add RTL supportJ-P Nurmi2013-08-131-1/+6
|/ | | | | | Change-Id: I60f997e545076feb5b72fb9eb4a03b050db5f511 Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Make QQuickSettings::style a property with a notifier signalJ-P Nurmi2013-05-241-1/+1
| | | | | Change-Id: I9f1690524e29cd7fe0ab35be216aca9a6edd35ca Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Improve top-level index page for documentationJens Bache-Wiig2013-05-161-1/+1
| | | | | | | | | | | | - Adds Menus to the front page so that we can actually find essential types like Menu and Action. - Added a basic example for Action - I also added ExclusiveGroup to the Controls category to make it accessible. Change-Id: Ife980b786870d2bf07d709e024cb97396870e6c7 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Refactor and clean up public style APIJens Bache-Wiig2013-05-081-0/+1
| | | | | Change-Id: I10271c860abd9b45a262e3548628e6a3026e1a4f Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Doc: correct for compliancy with Writing GuidelinesNico Vertriest2013-05-071-0/+1
| | | | | | | | Task-number: QTBUG-30318 Change-Id: If3916f3250f202a5da4b1f8034ecfba984367af3 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* MenuBar: Make widgets-less style workGabriel de Dietrich2013-04-261-1/+0
| | | | | Change-Id: I3a92408085d7d2aac663647d27b1f8d0f602b73e Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Remove hard dependency on widgetsJens Bache-Wiig2013-04-151-2/+1
| | | | | Change-Id: I1fabb4efcc931f12f0a65ac5c66e6e085108269b Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Several documentation improvementsGabriel de Dietrich2013-03-211-2/+1
| | | | | | | Includes Menu, MenuItem, Action, and ExclusiveGroup. Change-Id: I447c36fe361bbad2f5a31584f242601a150832fa Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: updated the \brief statementNico Vertriest2013-03-141-1/+1
| | | | | | Change-Id: I370c307f6e13ca22d464c842fa30f69e99ebdb37 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
* MenuBar: Unhover item when cursor leaves the menubar areaGabriel de Dietrich2013-03-141-0/+1
| | | | | Change-Id: I7c2e0c340a65d7fc524eb42ba798c57fa88ad1db Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Change imports from QtQuick 2.0 to QtQuick 2.1Caroline Chao2013-03-141-1/+1
| | | | | | Change-Id: If9df032c76e36f385aacd30cc31d6f02574c6f11 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Menu: Rename 'text' property to 'title'Gabriel de Dietrich2013-03-111-2/+2
| | | | | Change-Id: Ib0b1445593ff48df56cd8d4d20122880c2dacca5 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* MenuBar: Fix appearance on Windows, UbuntuGabriel de Dietrich2013-03-051-9/+14
| | | | | | | | | | | | | On top of adding the pixels below the menubar, we also set the proper font on the painter before rendering. This font was originally set when initializing the QPainter from the widget to be rendered. Since we don't have any widget, we set it just before the style rendering calls. Also added more pixel metrics properties. Change-Id: I631699458403ecc3d83d5c9bbf57805d18547c71 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* MenuBar: Fix mouse interactionGabriel de Dietrich2013-03-041-19/+23
| | | | | | | Used the same pattern as earlier with Menu. Change-Id: Id7a2d791516ba6d827e90c3b3e11f97dd326ccd5 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Menus: Doc, manual test fixesGabriel de Dietrich2013-03-011-9/+0
| | | | | Change-Id: I98c4c6aa39f9a947f0610ac976ed74447252d06b Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Doc: replace //! entries for /*! */Gabriel de Dietrich2013-03-011-3/+3
| | | | | Change-Id: Ieba2816190fc08bd2ec6410c4eb99e6557ab6206 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>