How to set vertical alignment on the new `Grid` widget?

Is it simply the case that the API of the Grid widget on master is incomplete, or is there a way to set the vertical alignment of each row?

I’m essentially building a form which is a 2-column grid of "Label → Input Widget"s. I’d like the label and the input widget to be aligned vertically centered.

This screenshot shows the current default behaviour. Note how the “Nickname” text is aligned to the top of the row.

image

EDIT: To add to this, calling align_x on the text widget itself (i.e. text("Nickname:").align_x(...) works for shifting the text on the x plane, but align_y doesn’t exhibit this behaviour off the bat.

EDIT 2: I’ve just figured out how to use the explain method properly…

image

So, align_y isn’t working because clearly the bounding box is the same height as the text. In that case, it looks like I want the bounding box of the left-hand cell to be the same height as the text input box so that I can call align_y on the text, or I want there to be an bounding box enclosing the whole row, and to be able to align items within that.

EDIT 3: In the meantime, I’ve solved this by wrapping the label text in a container and applying vertical padding equivalent to that of the adjacent input widget. Seems a bit hacky, but works for my use case.