[SailfishDevel] Silica TextField - strange clipping?
Zoltán Lutor
zoltan.lutor at gmail.com
Sun Oct 1 16:01:29 UTC 2017
aaaa, yet another looser-user issue! :D
TextField dimensions include the label field as well - even if label is not
visible!
=> actual input field height is cca. half of the whole TextItem.
Logical but unexpected because Qt 5.9 works differently in Android...
Br,
Zoltan
<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>
2017-09-29 22:39 GMT+02:00 Zoltán Lutor <zoltan.lutor at gmail.com>:
> 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>
> <#m_-2969925337130385704_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20171001/fea929ce/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/20171001/fea929ce/attachment-0001.png>
More information about the Devel
mailing list