reworked when window size is set