Set maximum length to a proportion of the screen size