when resizing take window size -24px