Currently, the horizontal scroll bar scrolls by a very small amount
of time when the arrow keys on the keyboard are used. This is because
View::horizontalScrollBar's single step size is never set.
In order to make the arrow keys become useful, this patch sets this
step size equal to the major tick width of the ruler. This results
in scrolling by a fair amount of time without losing track of the
context and also preserving the positions of the major ticks on
the ruler when scrolling.
get_scroll_layout(length, offset);
length = max(length - areaSize.width(), 0.0);
+ int major_tick_distance = tick_period_ / scale_;
+
horizontalScrollBar()->setPageStep(areaSize.width() / 2);
+ horizontalScrollBar()->setSingleStep(major_tick_distance);
updating_scroll_ = true;