traverso-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Traverso-commit] traverso/src/traverso/songcanvas SongView.cpp


From: Remon Sijrier
Subject: [Traverso-commit] traverso/src/traverso/songcanvas SongView.cpp
Date: Tue, 13 Nov 2007 12:57:11 +0000

CVSROOT:        /sources/traverso
Module name:    traverso
Changes by:     Remon Sijrier <r_sijrier>       07/11/13 12:57:11

Modified files:
        src/traverso/songcanvas: SongView.cpp 

Log message:
        * little tuning on the shuttle. added a 'dead zone' on the y-axis, to 
avoid vertical scrolling when the user only wants to scroll horizontally.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/songcanvas/SongView.cpp?cvsroot=traverso&r1=1.80&r2=1.81

Patches:
Index: SongView.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/songcanvas/SongView.cpp,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -b -r1.80 -r1.81
--- SongView.cpp        5 Nov 2007 15:49:32 -0000       1.80
+++ SongView.cpp        13 Nov 2007 12:57:11 -0000      1.81
@@ -137,8 +137,8 @@
        m_dragShuttleCurve->set_song(m_song);
        
        // Use these variables to fine tune the scroll behavior
-       float whens[7] = {0.0, 0.2, 0.5, 0.7, 0.8, 0.9, 1.3};
-       float values[7] = {0.0, 0.2, 0.3, 0.8, 0.95, 1.5, 8.0};
+       float whens[7] = {0.0, 0.2, 0.3, 0.4, 0.6, 0.9, 1.2};
+       float values[7] = {0.0, 0.1, 0.3, 0.8, 0.95, 1.5, 8.0};
        
        // Use these variables to fine tune the scroll during drag behavior
        float dragWhens[7] =  {0.0, 0.9, 0.94, 0.98, 1.0, 1.1, 1.3};
@@ -429,7 +429,9 @@
        if (normalizedY < 0) normalizedY = 0;
        if (normalizedY > 1) normalizedY = 1;
        
-       if (normalizedY < 0.5) {
+       if (normalizedY > 0.35 && normalizedY < 0.65) {
+               normalizedY = 0;
+       } else if (normalizedY < 0.5) {
                normalizedY = 0.5 - normalizedY;
                direction = -1;
        } else if (normalizedY > 0.5) {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]