TextField ignores verticalAligment setting

Bug #1378784 reported by Michał Sawicz
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu UX
Fix Committed
Undecided
Unassigned
ubuntu-ui-toolkit (Ubuntu)
Opinion
Low
Unassigned

Bug Description

Given the code:

import QtQuick 2.2
import Ubuntu.Components 1.1

Rectangle {
    width: childrenRect.width + units.gu(2)
    height: childrenRect.height + units.gu(2)
    color: "darkgrey"

    Column {
        anchors.centerIn: parent
        spacing: units.gu(1)

        TextField {
            text: "Standard TextField"
        }

        TextField {
            height: units.gu(6)
            text: "Higher TextField"
            verticalAlignment: TextInput.AlignVCenter
        }
    }
}

The text in "Higher TextField" is not centered vertically in the field.

Zsombor Egri (zsombi)
Changed in ubuntu-ui-toolkit:
importance: Undecided → High
status: New → Triaged
assignee: nobody → Christian Dywan (kalikiana)
Zoltan Balogh (bzoltan)
Changed in ubuntu-ui-toolkit (Ubuntu):
assignee: nobody → Christian Dywan (kalikiana)
importance: Undecided → High
status: New → Triaged
Zoltan Balogh (bzoltan)
no longer affects: ubuntu-ui-toolkit
summary: - Text in TextField not aligned vertically
+ Text in TextField ignores verticalAligment setting
Revision history for this message
Cris Dywan (kalikiana) wrote : Re: Text in TextField ignores verticalAligment setting

I'm not sure what is expected of a TextField that isn't vertically aligned - bug 1571576 deals with alignment not being vertical by default. If you want other alignments UX input is needed - primary and secondary items as well as the clear button might have to follow the alignment as well.

Changed in ubuntu-ui-toolkit (Ubuntu):
status: Triaged → Incomplete
summary: - Text in TextField ignores verticalAligment setting
+ TextField ignores verticalAligment setting
Cris Dywan (kalikiana)
Changed in ubuntu-ui-toolkit (Ubuntu):
status: Incomplete → Triaged
status: Triaged → Incomplete
Revision history for this message
Rae Shambrook (raecontreras) wrote :

I talked to Zsombor about this, although I think there's not a lot of use cases for changing the alignment, Zsombor says changing this behaviour will break the API. What Zsombor has done though is make centre alignment the default.

Changed in ubuntu-ux:
status: New → Fix Committed
Revision history for this message
Cris Dywan (kalikiana) wrote :

So how are we going to address this? I'm not clear if we want to respect the alignment - and how exactly - or ignore it explicitly, like we effectively do right now.

Changed in ubuntu-ui-toolkit (Ubuntu):
status: Incomplete → Confirmed
status: Confirmed → Incomplete
Revision history for this message
Cris Dywan (kalikiana) wrote :

For the record, what I just clarified in an IRC discussion with Rae:

- Right now verticalAlignment doesn't affect anything.
- There's no known real life user.
- No designs make use of custom alignments - it's not desired.

So we just need to decide:

1) To deprecate it officially.
2) To leave the bug open indefinitely - I don't see a trivial fix and if nobody's using it spending a lot of time on that seems questionable.

Changed in ubuntu-ui-toolkit (Ubuntu):
importance: High → Low
status: Incomplete → Opinion
assignee: Christian Dywan (kalikiana) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.