adjust the size of mainwindow