mirror of
https://github.com/DreamSourceLab/DSView.git
synced 2025-01-13 13:32:53 +08:00
improve mouse drag-and-drop effect
This commit is contained in:
parent
3bc3da8a35
commit
be3602df32
@ -512,10 +512,10 @@ void Viewport::mouseReleaseEvent(QMouseEvent *event)
|
||||
_drag_sig.reset();
|
||||
|
||||
const double strength = _drag_strength*DragTimerInterval*1.0/_time.elapsed();
|
||||
if (_drag_strength < MinorDragOffsetUp && abs(strength) > MinorDragRateUp) {
|
||||
if (abs(_drag_strength) < MinorDragOffsetUp && abs(strength) > MinorDragRateUp) {
|
||||
_drag_strength = _drag_strength;
|
||||
_drag_timer.start(DragTimerInterval);
|
||||
} else if (abs(strength) > 0.5*DragTimerInterval) {
|
||||
} else if (abs(strength) > DragTimerInterval) {
|
||||
_drag_strength = strength * 5;
|
||||
_drag_timer.start(DragTimerInterval);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user