[SailfishDevel] Silica TextField - strange clipping?
Zoltán Lutor
zoltan.lutor at gmail.com
Fri Sep 29 20:39:55 UTC 2017
Hi,
I've experienced strange behaviour of TextFiled QML component:
placeholderText is displayed correctly but text is clipped (see below). QML
snippet is attached at the end.
it seems there is a 'clipping area' applied if text field is set - but that
is not in use for placeholderText...
Any idea what do I do wrong?
Thx,
Zoltan
[image: Szövegközi kép 1]
TextField {
// no styles => do it in this way...
background: Rectangle {
id: backgroundItem
anchors.fill: parent
radius: height/3
//color: "lightsteelblue"
// https://www.w3schools.com/colors/colors_picker.asp
color: "#80bfff"
border.color: "gold"
border.width: Math.max(height/15,1)
}
id: nameInputField
width: parent.width*0.85
height: parent.height/8
anchors.top: playerNameLabel.bottom
anchors.horizontalCenter: parent.horizontalCenter
anchors.topMargin: height/2
horizontalAlignment: TextInput.AlignHCenter
*placeholderText*: "<your name>"
placeholderColor: "orangered"
*text*: "Beno a nyero"
color: "white"
textMargin: height/4
font.bold: false
font.letterSpacing: 0
font.family: oogieBoogieFont.name
readOnly: false
focus: true
onHeightChanged: { font.pixelSize = Scaling.scaleVertical(27) }
}
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20170929/0f872977/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 24669 bytes
Desc: not available
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20170929/0f872977/attachment-0001.png>
More information about the Devel
mailing list