adapt scrollbar range