diff options
| author | Gabriel de Dietrich <gabriel.dedietrich@digia.com> | 2014-03-03 23:12:48 +0100 |
|---|---|---|
| committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-07 17:39:20 +0100 |
| commit | 50899263b50ec8a8bff9ed0fbbf69b6c1d8aa9f7 (patch) | |
| tree | 9b644aa531d36d628ba555930a9a45f991667d86 /src | |
| parent | 44c2740e0ece7d58e1062d9e4a4420cb3e317cbc (diff) | |
Menu: Harden popup closing logic
This should avoid menu popups flickering on the
screen when moving quickly over submenu items.
Change-Id: If1d4be4e643d20be01b9ad31ef5b025c5437e761
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/controls/Private/MenuContentItem.qml | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/controls/Private/MenuContentItem.qml b/src/controls/Private/MenuContentItem.qml index 59000391f..f55077a0e 100644 --- a/src/controls/Private/MenuContentItem.qml +++ b/src/controls/Private/MenuContentItem.qml @@ -216,7 +216,12 @@ Loader { onTriggered: menuItemLoader.__showSubMenu(true) } - function __closeSubMenu() { closeMenuTimer.start() } + function __closeSubMenu() { + if (openMenuTimer.running) + openMenuTimer.stop() + else if (__menuItem.__popupVisible) + closeMenuTimer.start() + } Timer { id: closeMenuTimer |
