View: Decouple horizontal scrolling from the scoll bar
authorAlexandru Gagniuc <mr.nuke.me@gmail.com>
Sat, 26 Jan 2013 06:35:17 +0000 (00:35 -0600)
committerAlexandru Gagniuc <mr.nuke.me@gmail.com>
Sat, 26 Jan 2013 06:35:17 +0000 (00:35 -0600)
Scrolling horizontally, regardless if through the tilt wheel, dragging the
signals, or moving the scroll bar, updates the viewport and the scroll bar. This
triggered a valueChanged() signal from the scroll bar, causing the viewport to
be updated again (redundantly). The operation of the viewport became dependent
on the scroll bar. On high zoom levels, where the scroll bar's resolution is
limited, the coupling manifested as jitter. The view was rendered with the
proper resolution of, caused the mouse drag event, then immediately updated and
rendered with the limited resolution of the scroll bar.

Decouple the viewport from the valueChanged() signal, and use the sliderMoved()
signal instead. The scroll bar becomes a simple input element, and only causes
a viewport update when acted upon by the user. Using the scroll bar is still
limited in resolution, but other scrolling methods are no longer affected by the
limitations of the scroll bar.

This fixes bug 7.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>

No differences found