Consolidate logic for calculating scrollbar page step size