We have moved to a new Sailfish OS Forum. Please start new discussions there.

Revision history [back]

click to hide/show revision 1
initial version

posted 2019-09-07 10:56:21 +0200

Silica TextField text is aligned too low

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: image description

  TextField {
      horizontalAlignment: TextInput.AlignHCenter
      // The hoops:
     //_editor.verticalAlignment: TextInput.AlignTop
     //on_EditorChanged: _editor.verticalAlignment = TextInput.AlignTop
    // Component.onCompleted: _editor.verticalAlignment = TextInput.AlignTop
  }

Silica TextField text is aligned too low

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: image description

 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

Silica TextField text is aligned too low

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: image description

  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