aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJarkko Koivikko <jarkko.koivikko@code-q.fi>2016-12-15 23:07:39 +0200
committerJarkko Koivikko <jarkko.koivikko@code-q.fi>2016-12-18 17:03:17 +0000
commit11227384bd2e094a455410b0d745a3d3bb2222c0 (patch)
tree6e906f20475c9223fa392cdfb89eb13186fbd441
parentc52e057ae49afb1ec252beab91c08366d08ae335 (diff)
Fix WordCandidatePopupList background
The left edge of the background was clipped away sometimes. This happened because the location of the box was not rounded to full pixels. Change-Id: I4dc97035ee3d5495d6652ef532b5db2b46361e27 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
-rw-r--r--src/virtualkeyboard/content/components/WordCandidatePopupList.qml6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/virtualkeyboard/content/components/WordCandidatePopupList.qml b/src/virtualkeyboard/content/components/WordCandidatePopupList.qml
index 5057dfa8..7740cbf9 100644
--- a/src/virtualkeyboard/content/components/WordCandidatePopupList.qml
+++ b/src/virtualkeyboard/content/components/WordCandidatePopupList.qml
@@ -54,16 +54,16 @@ ListView {
Binding {
target: wordCandidatePopupList
property: "x"
- value: Qt.inputMethod.cursorRectangle.x -
+ value: Math.round(Qt.inputMethod.cursorRectangle.x -
(wordCandidatePopupList.currentItem ?
(wordCandidatePopupList.currentItem.hasOwnProperty("cursorAnchor") ?
- wordCandidatePopupList.currentItem.cursorAnchor : wordCandidatePopupList.currentItem.width) : 0)
+ wordCandidatePopupList.currentItem.cursorAnchor : wordCandidatePopupList.currentItem.width) : 0))
when: wordCandidatePopupList.visible
}
Binding {
target: wordCandidatePopupList
property: "y"
- value: wordCandidatePopupList.flipVertical ? Qt.inputMethod.cursorRectangle.y - wordCandidatePopupList.height : Qt.inputMethod.cursorRectangle.y + Qt.inputMethod.cursorRectangle.height
+ value: Math.round(wordCandidatePopupList.flipVertical ? Qt.inputMethod.cursorRectangle.y - wordCandidatePopupList.height : Qt.inputMethod.cursorRectangle.y + Qt.inputMethod.cursorRectangle.height)
when: wordCandidatePopupList.visible
}
orientation: ListView.Vertical