diff options
author | Vova Mshanetskiy <vovams163@gmail.com> | 2019-04-25 20:34:13 +0300 |
---|---|---|
committer | Vova Mshanetskiy <vovams163@gmail.com> | 2019-05-01 12:11:04 +0000 |
commit | 5f4b03659b1e2318acb87fd9bf7325f707dfa0ad (patch) | |
tree | a3479a00a7a89911d8af8c9ab9835530bbdd9b31 /tests | |
parent | a04629d9c2afb0e075a8872793718832200ea26b (diff) |
Android: Fix positioning of text editor context menu
The old code in QtActivityDelegate.updateHandles() and
EditPopupMenu.setPosition() could use size of EditPopupMenu.m_view to
calculate position of context menu before that size was calculated
during an asynchronous layout pass. In particular m_view reports size
0x0 when context menu is opened for the first time after start of the
application. In this case the context menu was displayed on top of the
text editor instead of being displayed above it.
This patch fixes that problem by moving all positioning code from
QtActivityDelegate.updateHandles() to EditPopupMenu.setPosition() and
adding an OnLayoutChangeListener which calls setPosition() again each
time the size of m_view changes, including when it changes for the first
time from 0x0 to a real value.
Change-Id: I670fef811a4dcba5524f7520ea41a47978dd10f1
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions