Fix submenu positioning
authorMiikka Heikkinen <miikka.heikkinen@digia.com>
Mon, 27 Feb 2012 11:54:21 +0000 (13:54 +0200)
committerQt by Nokia <qt-info@nokia.com>
Mon, 27 Feb 2012 19:52:45 +0000 (20:52 +0100)
commit64e0560ff451676fc96dfadd21bef436ac25bb52
tree24609f7c381f8551b10e297c73f4c7dae86c1e48
parentfa5cf01e7468e53508b15726625fd681892119a4
Fix submenu positioning

Submenus are now positioned to the correct side of the parent menu
based on layout direction, if there is enough space on screen to fit
the menu. If there is insufficient space, then the menu is positioned
to the other side of the parent menu. In case that also causes submenu
to be partially ofscreen (very wide menu relative to the screen),
then the submenu will be aligned with the screen edge and will overlap
the parent menu. This seems like a lesser evil compared to having
submenu partially offscreen, which could obscure important details
such as checkmarks.

Task-number: QTBUG-23568
Change-Id: I6a9ab2c232713a2ee5a6dde3227c40419d46bd3d
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
src/widgets/widgets/qmenu.cpp