Use min app size to center window
Fixed #127. The program no longer crashes due to already disposed widgets