Auto fit window size