-
Notifications
You must be signed in to change notification settings - Fork 478
Description
(First of all sorry for my english)
When one starts to input Khmer or Hindi chars to TextField it's changes height, width or position depends on parent objects. This behavior was detected only with Khmer and Hindi (Thai, Chines, Japanese, Arabic seems alright).
I've not familiar with qml enough to get the reason of this problem, so I did some investigation:
I've embedded button in material-demo to obtain some information about TextField
Button {
text: "Get info"
onClicked: console.log("text : " + userName.text +
"; x = " + userName.x + "; y = " + userName.y +
"; height = " + userName.height + "; width = " + userName.width +
"; font pixel size = " + userName.font.pixelSize)
}
output of TextField child of ColumnLayout in TextFieldDemo.qml :
qml: text : Eng and Другой; x = 68; y = 71; height = 25; width = 144; font pixel size = 14
qml: text : ठीक लगती है; x = 64; y = 71; height = 25; width = 152; font pixel size = 14
qml: text : ហាក់ដូចជាអី; x = 40; y = 71; height = 30; width = 200; font pixel size = 14
Looks Hindi does not alter the height but slightly changes width and x position of TextField. Khemer changes x, width and height.
But when TextField is child of ListItem.Standard Hindi looks good and only Khmer has problem with height and positioning (y)
output of TextField child of ListItem.Standard in FormsDemo.qml :
qml: text : ឈ្មោះអ្នកប្រើ; x = 0; y = 7; height = 30; width = 237; font pixel size = 14
qml: text : Some text ; x = 0; y = 9; height = 25; width = 237; font pixel size = 14
qml: text : अंतर्राष्ट्रीयकरण; x = 0; y = 9; height = 25; width = 237; font pixel size = 14
The position changes is not constant and depends on font size, so it's hard to provide some flexible view (not hard coded hacks).
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.