added shrink/restore window size logic;

replaced slider with spinbox.