Mercurial > hg > svgui
comparison view/Pane.cpp @ 1404:a33d38247631
Make horizontal wheeling a bit less crazily fast in the absence of fine delta information
author | Chris Cannam |
---|---|
date | Fri, 16 Nov 2018 09:01:38 +0000 |
parents | b0eeec95ab5b |
children | c8a6fd3f9dff |
comparison
equal
deleted
inserted
replaced
1403:10e768adaee5 | 1404:a33d38247631 |
---|---|
2365 } | 2365 } |
2366 | 2366 |
2367 void | 2367 void |
2368 Pane::wheelHorizontal(int sign, Qt::KeyboardModifiers mods) | 2368 Pane::wheelHorizontal(int sign, Qt::KeyboardModifiers mods) |
2369 { | 2369 { |
2370 // cerr << "wheelHorizontal: sign = " << sign << endl; | |
2371 | |
2372 // Scroll left or right, rapidly | 2370 // Scroll left or right, rapidly |
2373 | 2371 |
2374 wheelHorizontalFine((width() / 4) * sign, mods); | 2372 wheelHorizontalFine(120 * sign, mods); |
2375 } | 2373 } |
2376 | 2374 |
2377 void | 2375 void |
2378 Pane::wheelHorizontalFine(int pixels, Qt::KeyboardModifiers) | 2376 Pane::wheelHorizontalFine(int pixels, Qt::KeyboardModifiers) |
2379 { | 2377 { |
2380 // cerr << "wheelHorizontalFine: pixels = " << pixels << endl; | |
2381 | |
2382 // Scroll left or right by a fixed number of pixels | 2378 // Scroll left or right by a fixed number of pixels |
2383 | 2379 |
2384 if (getStartFrame() < 0 && | 2380 if (getStartFrame() < 0 && |
2385 getEndFrame() >= getModelsEndFrame()) { | 2381 getEndFrame() >= getModelsEndFrame()) { |
2386 return; | 2382 return; |