[Android] Fix Text select handle misplaced on fields inside QDialog issues
Get cursorPoint from a mapToGlobal with a cursorRectangle of the selected inputMethod Fixes: QTBUG-65229 Fixes: QTBUG-58503 Change-Id: I89b056fa91c59d260f02164c9bd6672b5ada64d6 Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> (cherry picked from commit a5bb7b3ca510c301baf84e1dd46d5aeeb4986eb2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
32734f351b
commit
8cb8dab030
@ -645,8 +645,8 @@ void QAndroidInputContext::updateSelectionHandles()
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto curRect = im->cursorRectangle();
|
auto curRect = im->cursorRectangle();
|
||||||
QPoint cursorPoint(curRect.center().x(), curRect.bottom());
|
QPoint cursorPoint = qGuiApp->focusWindow()->mapToGlobal(QPoint(curRect.x() + (curRect.width() / 2), curRect.y() + curRect.height()));
|
||||||
QPoint editMenuPoint(curRect.x(), curRect.y());
|
QPoint editMenuPoint(cursorPoint.x(), cursorPoint.y());
|
||||||
m_handleMode &= ShowEditPopup;
|
m_handleMode &= ShowEditPopup;
|
||||||
m_handleMode |= ShowCursor;
|
m_handleMode |= ShowCursor;
|
||||||
uint32_t buttons = EditContext::PasteButton;
|
uint32_t buttons = EditContext::PasteButton;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user