Made painting positions independent of window height