fixing the scrolling of the canvas by recreating the setMinimumSize method on the canvas.