Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Alignment of required-field-indicator in GridLayout
I updated from 7.3.2 to 7.6.5.
It seems that the alignment of the required-field-indicator changes significant in GridLayouts.
In 7.3.2 the field-indicator was just on the right of a TextField.
In 7.6.5 the field-indicator is aligned to the right of the grid column. If the column is much wider than the TextField and the TextField is aligned to the left, there is a lot of space between the field and the indicator, which does not look really good.
I have reproduced it with this little code, which i adapted from the vaadin demo:
public class GridTest extends GridLayout
{
GridTest sample;
public GridTest()
{
super();
// Create a grid layout
sample = this;
sample.addStyleName("outlined");
sample.setWidth(600, Unit.PIXELS);
sample.setHeight(300, Unit.PIXELS);
generateMatrixGrid(3, 2);
}
private void generateMatrixGrid(final int rows, final int columns) {
sample.removeAllComponents();
sample.setRows(rows);
sample.setColumns(columns);
for (int row = 0; row < sample.getRows(); row++) {
for (int col = 0; col < sample.getColumns(); col++) {
final LayoutChildComponent child = new LayoutChildComponent(sample, false);
sample.addComponent(child);
sample.setRowExpandRatio(row, 0.0f);
sample.setColumnExpandRatio(col, 0.0f);
}
}
}
class LayoutChildComponent extends TextField
{
public LayoutChildComponent(GridLayout grid, boolean bool) {
setValue("Child " + (grid.getComponentCount() + 1));
setRequired(true);
}
}
}
Is this a bug?
Thanks,
Christian
the problem exists with the reindeer theme. The required-field-indicator is aligned correct with valo.