Flexible layout and constraint element size

@kerguelen maybe also this post could be useful