improved ruler and scrollbar