Calculate needXScroll with scrollbarSize