Move the logic of constraint application from ItemView to the layout