I might suggest pulling this calculation into a method, named based on it's function.  It's unclear what this is adding to the viewHeight.