Use accumulator for seeking via scrolling
This results in much smoother experience on my touchpad. The value of 120 was chosen as the most common for mice, according to Qt 6 documentation.
This commit is contained in:
committed by
Jonas Kvinge
parent
3ecf224d91
commit
3bd0331aa3
@@ -66,11 +66,16 @@ class TrackSliderSlider : public QSlider {
|
||||
void UpdateDeltaTime();
|
||||
|
||||
private:
|
||||
// Units are eighths of a degree
|
||||
static const int WHEEL_ROTATION_TO_SEEK = 120;
|
||||
|
||||
#ifndef Q_OS_MACOS
|
||||
TrackSliderPopup *popup_;
|
||||
#endif
|
||||
|
||||
int mouse_hover_seconds_;
|
||||
|
||||
int wheel_accumulator_;
|
||||
};
|
||||
|
||||
#endif // TRACKSLIDERSLIDER_H
|
||||
|
||||
Reference in New Issue
Block a user