]> sigrok.org Git - pulseview.git/blobdiff - pv/view/view.cpp
View: Make horizontal arrow-key scrolling useful
[pulseview.git] / pv / view / view.cpp
index fce5b18c2fc487b52a3cb365b47e2d4a9f76c65c..5877c22d87584ed2e506e5dfdf5e76b35d5b6fa8 100644 (file)
@@ -451,7 +451,10 @@ void View::update_scroll()
        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;