| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
When a menu item with a sub-menu was triggered by key or mouse,
it would open the sub-menu with the first menu item highlighted.
This doesn't make sense for disabled menu items, so this patch
makes it find the first enabled item.
Change-Id: I9df1c750749e5a77b027b6f476b8ae1f5ea035bd
Fixes: QTBUG-69540
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts the following commits:
d5cb26bc56a3b6f6e99c88654d4f7a65f43551ac - Menu: ensure the correct delegates are used when created via Component
d923dd467c1aeb3e195a09949b04862084002f88 - MenuBar: ensure the correct delegates are used when created via Component
d56c193eb4ceb640611d66f22e1f26aae91cd7d1 - QQuickPopupPositioner: avoid adding duplicate item change listeners
567a2de8cd493aabe0055d6dbc367b39447e70dd - Stabilize tst_qquickmenubar
953fbac6131823e4fce0eb4707a854469c4c04ff - Fix Instantiator-created MenuItems disappearing
936d31179d44220571ded15840bedeccb581c83b - tst_qquickmenu: add a test for MenuItems before and after a Repeater
fc1832810f6c09505d9413685ed0b2d6295bea4a - QQuickMenuBar: fix menu not opening
The fix for QTBUG-67559 has caused lots of issues, with the latest being a
crash right before the 5.12 release. The bug that they fix is a P2,
so it's not worth the hassle. The patches might be able to be resubmitted
to dev after the crash is fixed.
Change-Id: Ic192c7a302176bcdb2503b636b3462b10898a2ba
Fixes: QTBUG-71770
Reviewed-by: J-P Nurmi <jpnurmi@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|\
| |
| |
| | |
Change-Id: I3fa0011d8b69db2a004feb177a7f89ccb75a724d
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Don't add items until we're complete, as the delegate could change in
the meantime. Instead, add them to contentData and create them when
we're complete.
Task-number: QTBUG-67559
Change-Id: I5f42129f49de861ff5f15d0069daeda0b4e5017c
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/quicktemplates2/qquickabstractbutton_p_p.h
src/quicktemplates2/qquickcombobox.cpp
src/quicktemplates2/qquickcontainer.cpp
src/quicktemplates2/qquickcontrol.cpp
src/quicktemplates2/qquickcontrol_p_p.h
src/quicktemplates2/qquickdialog_p_p.h
src/quicktemplates2/qquickdialogbuttonbox.cpp
src/quicktemplates2/qquickdialogbuttonbox_p_p.h
src/quicktemplates2/qquickdrawer.cpp
src/quicktemplates2/qquickmenubar.cpp
src/quicktemplates2/qquickmenubar_p_p.h
src/quicktemplates2/qquickpage.cpp
src/quicktemplates2/qquickpage_p_p.h
src/quicktemplates2/qquickpane.cpp
src/quicktemplates2/qquickpane_p_p.h
src/quicktemplates2/qquickpopup.cpp
src/quicktemplates2/qquickpopup_p_p.h
src/quicktemplates2/qquickrangeslider.cpp
src/quicktemplates2/qquickscrollview.cpp
src/quicktemplates2/qquickslider.cpp
src/quicktemplates2/qquickspinbox.cpp
src/quicktemplates2/qquickswipeview.cpp
src/quicktemplates2/qquicktabbar.cpp
src/quicktemplates2/qquicktextarea_p_p.h
src/quicktemplates2/qquicktextfield_p_p.h
src/quicktemplates2/qquicktheme_p.h
Change-Id: I6e2b8fe99e51e3e26c87546aa66af045bc429ec4
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The code is more readable and less error-prone (this patch caught a few
uninitialized members) when the members are initialized in the same
place where they are declared. In many cases, empty default destructors
can be entirely removed, and we get faster implicitly declared inline
default constructors defined by the compiler.
Change-Id: I14c5448afc901f9b2ac5965f28c1c26c0b646c08
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|/
|
|
|
| |
Change-Id: Iea8c1b8609778604af06cc70eaefad21f00186bd
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MenuBar is an ordinary Item. It can be located basically anywhere, but
the idea is to introduce a new ApplicationWindow::menuBar property in a
follow-up commit. Currently the example snippets are using the header
property.
[ChangeLog][Controls][MenuBar] Introduced a MenuBar control.
Task-number: QTBUG-60350
Change-Id: Ie66dc457a3d8edbe8362fab2a591dc49442c95e2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
| |
Change-Id: I8125971dd91614984379e734af21f5ff28852667
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
A cascading sub-menu is parented to the menu item in its parent menu,
but a non-cascading sub-menu is parented to the parent menu's parent
item to be able to have the sub-menu visible while the parent menu
is hidden (non-cascading menus are opened and closed one by one).
Based on these conditions, resolve the parent item automatically
instead of doing it by hand in openSubMenu().
Change-Id: I5dd38ee0978604cd604dabf6f40ac4fb5f3eebbe
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
| |
Change-Id: Ia63148beee6b574e435a120be245601b3a0b3322
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
| |
To help propagating the cascade-property automatically, instead of
doing it manually in openSubMenu() that we're trying to get rid of.
Change-Id: I3a3d59cafccc85d6affc325eb60e717e22b8f812
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
| |
Moving stuff away from openSubMenu() until we can remove it...
Change-Id: I0a979a6a0de25584a213b59e1d29d3b9f78b184e
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
| |
[ChangeLog][Controls][Menu] Added a dismiss() method. Unlike close()
that only closes a menu and its sub-menus, dismiss() closes the whole
hierarchy of menus, including the parent menus.
Change-Id: Ibde2102bbb542a5deefdf17843496b7b80021db4
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
De-couple current index management from the content item. Instead of
manipulating the content item's current index directly from C++, offer
a currentIndex property that can be visualized by the style, also when
not using a ListView. This is essentially the same technique ComboBox
uses to control the highlighted index in the popup ListView.
[ChangeLog][Controls][Menu] Added currentIndex property for styling
purposes.
Change-Id: Idf7746d9c08fc9ca9a0dfd15225ebae5a29243c9
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/imports/controls/ButtonGroup.qml
tests/auto/controls/data/tst_container.qml
tests/auto/menu/tst_menu.cpp
Change-Id: Ie8ee7e4f83f3fda6a09507b060576ebda929a7cd
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Skip non-focusable separators, and use a key focus reason
(Qt::TabFocusReason & Qt::BacktabFocusReason) to give the
items visual focus.
[ChangeLog][Controls][Menu] Fixed key navigation to skip separators.
Change-Id: I99affabc50703c7363ab8146e5ced9b45111de00
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This improves the usability on desktop. When a menu has multiple sub-
menu items, they don't all trigger a sub-menu (and close immediately)
while moving mouse over the items.
Change-Id: Ie4c9e409da8d6877e35506bffb94ed57f5985dcd
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QQuickMenu was developed before QQuickControl::focusPolicy was added.
Now that QQuickAbstractButton sets Qt::StrongFocus, which includes
Qt::ClickFocus, by default, it gains active focus automatically and
there is no need to call forceActiveFocus() by hand. This patch does
not include new tests, because QQuickMenuItem's focus behavior is
already tested in tst_menu.
Change-Id: Ia2c9bed34548c3edbb54b8e5dc1207b3c7520b22
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit adds initial support for cascading sub-menus by allowing
one to nest declarative Menu declarations. A follow-up commit adds
support for adding, inserting, and removing menus programmatically.
[ChangeLog][Controls][Menu] Added support for cascading sub-menus.
Task-number: QTBUG-60351
Change-Id: I0eee4f74d92a97c09333fcc4348b019782448535
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is the expected behavior on desktop.
NOTE: It must be possible to mix mouse hover highlighting, and keyboard
navigation in the way that keyboard navigation must seamlessly continue
from the item that was previously mouse highlighted. Furthermore, there
should be only one item highlighted at a time. In order to be able to
respect keyboard navigation while another item is hovered and vice versa,
the visual highlight should be bound to MenuItem::highlighted instead of
Control::activeFocus or Control::hovered.
[ChangeLog][Controls][MenuItem] Menu has been fixed to highlight its
items while key navigating and mouse hovering to ensure seamless item
highlight between mouse hover and key navigation. In order to provide
appropriate highlighting that works for key navigation and mouse hover,
styles should bind their visual highlight to MenuItem::highlighted
instead of Control::activeFocus or Control::hovered.
Change-Id: I70cad5a5b441f2616d1ce2166e97974dc1ae063f
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
[ChangeLog][Controls][MenuItem] Added a "menu" property that provides
access to the menu that contains the menu item.
Change-Id: I5edbf860756ba7ba9aef93d4992720327c10d1df
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|/
|
|
|
|
|
|
|
| |
[ChangeLog][Controls][Menu] Added support for declaring Actions.
The new "delegate" property is used to define a Component that is
used to create menu items that present the actions.
Change-Id: If26f38f6910aa5592879703429a2b418193d5710
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|\
| |
| |
| | |
Change-Id: If797ac58344b20e8de4379343131c097247ba2f2
|
| |
| |
| |
| |
| | |
Change-Id: If68cff4efacc7dc5719c8b8e61937e85e9076870
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|/
|
|
|
| |
Change-Id: Ia075694a7dc43d72d07221b569467fcebdb411fb
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/imports/controls/material/qquickmaterialstyle.cpp
src/imports/controls/universal/qquickuniversalstyle.cpp
src/quicktemplates2/qquickpopup_p_p.h
src/quicktemplates2/qquicktooltip.cpp
tests/auto/auto.pro
Change-Id: I88b347dd85278e14f7b2ca468e30648c6432b6f2
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Move the itemDestroyed() listener from QQuickPopupPositioner, which is
only active while the popup is visible, to QQuickPopupPrivate instead.
This way the popup gets a notification when the parent gets destroyed
while the popup is hidden.
Task-number: QTBUG-55347
Change-Id: Ic72206cc05996c23062e814799a030c369fc6288
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|/
|
|
|
|
|
|
| |
qtdeclarative commit e2c296c changed the itemGeometryChanged()
signature.
Change-Id: Ibe163e1d6fe8535a4ec01de047d72a0d4863979d
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
| |
They're all private classes.
Change-Id: I2f1463429109c5651f9cca5bc7aabe5cf0f79637
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
|
|
|
|
|
|
| |
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>
|
|
Change-Id: I146da903b46f5c2caf865e37291c25376b49021a
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
|