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>
_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Reply via email to