min and max size constraint added in the layout (the resize algorithm should be rethink though)