Update of /cvsroot/audacity/audacity-src/src
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv469/src

Modified Files:
        LabelTrack.cpp 
Log Message:
Makes labels useable when zoomed in, at the expense of a few vertical px (11)

Index: LabelTrack.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/LabelTrack.cpp,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- LabelTrack.cpp      20 Aug 2006 09:00:54 -0000      1.67
+++ LabelTrack.cpp      29 Aug 2006 23:40:28 -0000      1.68
@@ -91,7 +91,7 @@
    // Label tracks are narrow
    // Default is to allow two rows so that new users get the
    // idea that labels can 'stack' when they would overlap.
-   mHeight = 62;     
+   mHeight = 73;     
    CreateCustomGlyphs();
    mSelIndex = -1;
 
@@ -389,7 +389,7 @@
    // start, i.e. what is the y position of the icon?
    // We addjust this slightly so that the line encroaches on 
    // the icon slightly (there is white space in the design).
-   const int yIconStart = y - (LabelTrack::mIconHeight /2)+1;
+   const int yIconStart = y - (LabelTrack::mIconHeight 
/2)+1+(LabelTrack::mTextHeight+3)/2;
    const int yIconEnd   = yIconStart + LabelTrack::mIconHeight-2;
 
    if (y<0) 
@@ -418,7 +418,7 @@
    if (y<0) 
       return;
    const int xHalfWidth=LabelTrack::mIconWidth/2;
-   const int yStart=y-LabelTrack::mIconHeight/2;
+   const int yStart=y-LabelTrack::mIconHeight/2+(LabelTrack::mTextHeight+3)/2;
 
    if((x  >= r.x) && (x  <= (r.x+r.width)))
       dc.DrawBitmap(LabelTrack::GetGlyph(GlyphLeft), x-xHalfWidth,yStart, 
true);
@@ -474,7 +474,7 @@
       if( (xStart < (r.x+r.width)) && (xEnd > r.x) && (xWidth>0))
       {
          
-         wxRect bar( xStart,y-yBarHeight/2, 
+         wxRect bar( xStart,y-yBarHeight/2+yFrameHeight/2, 
             xWidth,yBarHeight);
          if( x1 > x+xBarShorten )
             dc.DrawRectangle(bar);
@@ -990,7 +990,7 @@
       pLabel = mLabels[i];
       
       //over left or right selection bound
-      if(   abs(pLabel->y - y) < d1 &&
+      if(   abs(pLabel->y - (y - (LabelTrack::mTextHeight+3)/2)) < d1 &&
             abs(pLabel->x + d2 - x) < d1 )
       {
          mMouseOverLabelLeft = i;
@@ -1001,7 +1001,7 @@
       }
       // use else-if so that we don't detect left and right 
       // of the same label.
-      else if( abs(pLabel->y-y ) < d1 &&
+      else if( abs(pLabel->y - (y - (LabelTrack::mTextHeight+3)/2)) < d1 &&
                abs(pLabel->x1 - d2 -x) < d1)
       {
          mMouseOverLabelRight = i;


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to