We have moved to a new Sailfish OS Forum. Please start new discussions there.
1 | initial version | posted 2019-09-07 10:56:21 +0200 |
As mentioned in this feature request the Silica TextField doesn't have a property verticalAlignment
, and no matter how many hoops you jump through, there are no ways to make it align properly without it. Hence a bug report instead.
As can be seen below, it aligns way off the baseline of a label:
TextField {
horizontalAlignment: TextInput.AlignHCenter
// The hoops:
//_editor.verticalAlignment: TextInput.AlignTop
//on_EditorChanged: _editor.verticalAlignment = TextInput.AlignTop
// Component.onCompleted: _editor.verticalAlignment = TextInput.AlignTop
}
2 | No.2 Revision |
As mentioned in this feature request the Silica TextField doesn't have a property verticalAlignment
, and no matter how many hoops you jump through, there are no ways to make it align properly without it. Hence a bug report instead.
As can be seen below, it aligns way off the baseline of a label:
Label {
id: fromSymbolLabel;
text: fromSymbol;
verticalAlignment: Text.AlignBottom
horizontalAlignment: Text.AlignRight
}
TextField {
horizontalAlignment: TextInput.AlignHCenter
// The hoops:
//_editor.verticalAlignment: TextInput.AlignTop
//on_EditorChanged: _editor.verticalAlignment = TextInput.AlignTop
// Component.onCompleted: _editor.verticalAlignment = TextInput.AlignTop
}
Label {
text: ' = ' + toSymbol + ' ' + qsTr("%L1").arg(result);
horizontalAlignment: Text.AlignHCenter;
verticalAlignment: Text.AlignBottom;
}
Edit: Added Labels for comparizon
3 | No.3 Revision |
As mentioned in this feature request the Silica TextField doesn't have a property verticalAlignment
, and no matter how many hoops you jump through, there are no ways to make it align properly without it. Hence a bug report instead.
As can be seen below, it aligns way off the baseline of a label:
label, even though the labels use AlignBottom
:
Label {
id: fromSymbolLabel;
text: fromSymbol;
verticalAlignment: Text.AlignBottom
horizontalAlignment: Text.AlignRight
}
TextField {
horizontalAlignment: TextInput.AlignHCenter
// The hoops:
//_editor.verticalAlignment: TextInput.AlignTop
//on_EditorChanged: _editor.verticalAlignment = TextInput.AlignTop
// Component.onCompleted: _editor.verticalAlignment = TextInput.AlignTop
}
Label {
text: ' = ' + toSymbol + ' ' + qsTr("%L1").arg(result);
horizontalAlignment: Text.AlignHCenter;
verticalAlignment: Text.AlignBottom;
}
Edit: Added Labels for comparizon