Expected behaviour
When inputting Japanese, the IME candidate window does not overlap with the text.
Actual behaviour
The IME candidate window overlaps by almost half, making it difficult to see the text being input.
Steps to reproduce
Steps to reproduce the behavior:
Open the edit screen
Enable the Japanese IME
Start inputting
Screenshots
QOwnNotes_IME.BEFORE.mp4
Workaround
I added ViewportMargins to QRectF of CursorQuery, thinking that ViewportMargins might not be reflected.
QOwnNotes_IME.CANDIDATE.mp4
Workaround code:
QVariant QOwnNotesMarkdownTextEdit::inputMethodQuery(Qt::InputMethodQuery property) const {
QVariant result = QPlainTextEdit::inputMethodQuery(property);
const bool isCursorQuery = (property == Qt::ImCursorRectangle || property == Qt::ImAnchorRectangle);
if (isCursorQuery) {
const QMargins vm = viewportMargins();
const QPoint offset(vm.left(), vm.top());
if (!offset.isNull()) {
if (result.userType() == QMetaType::QRectF) {
QRectF rect = result.toRectF().translated(0, qreal(offset.y()));
result = rect;
}
}
}
return result;
}
Probably only in Qt for Windows environments.
Expected behaviour
When inputting Japanese, the IME candidate window does not overlap with the text.
Actual behaviour
The IME candidate window overlaps by almost half, making it difficult to see the text being input.
Steps to reproduce
Steps to reproduce the behavior:
Screenshots
QOwnNotes_IME.BEFORE.mp4
Workaround
I added ViewportMargins to QRectF of CursorQuery, thinking that ViewportMargins might not be reflected.
QOwnNotes_IME.CANDIDATE.mp4
Workaround code:
Probably only in Qt for Windows environments.