Undoes Roger's fixes for bug 255/148, as this was one component of the bug.
This fix restores TrackPanel::RefreshTrack to using a cliprect instead of doing an entire refresh.
It does it by using a repair flag in TrackPanel::DoDrawIndicator that does not advance the indicator time (so the only place the time can advance is in OnTimer)
I tested to make sure both bugs were okay after my fix.
This fix may restore usability enough to resolve the bug, but I note that there are other potential optimizations we can make, discussed on the bug 406 bugzilla comments.
Further shrink minimize button width and center the button in the TrackInfo, so there's a blank to left and blank-or-sync-lock-icon to right, so track can be selected easily even when minimized.
(TrackInfo::DrawBordersWithin) Instead of gray line spanning TrackInfo at top of minimize button, draw it just the width of the button, and add one to the left of the minimize button.
Separate sync-lock icon drawing from minimize button drawing.
Make some magic numbers become named constants.
Some renames for clarity. Clean up some unused stuff.
Change sync-lock tile and icons to be clock instead of chain link. (Yet to change sync-lock button image.)
Make click on sync-lock icon select track.
Remove bevels on regions holding controls, so that bevels are only on controls themselves. This removes confusing border line above sync-lock icon, and simplifies the TrackInfo.
Be more specific about class methods vs stand-alone functions in comments.
Commented out the one call to TrackInfo::DrawBordersWithin(). This eliminates all the dark lines within the TrackInfo, in an effort to make the sync-lock icon not look like a button. It leaves some lighter borders, and I think that's an aesthetic improvement, though it make be worse in terms of accessibility. I can also remove the light border above the sync-lock icon, but I think this looks best overall.
In Track::IsSyncLockSelected(), for the "// Not in a sync-locked group." conditional, it returned true if the track was selected. I made it do so only if track kind is Wave or Label. Among other things, this means Time and Note tracks will never show the sync-lock icon. I think this is correct by definition, but Al, please let me know if this will have negative repercussions elsewhere. There are *lots* of calls to that method and I can move the track-type check to the code that draws the sync-lock icon..
Fixed the bug Gale pointed out where, if a WaveTrack is shrunk such that the sync-lock icon is over a TrackInfo control, such as pan slider, it didn't intercept the mouse event, and passed it on to the control. Now, clicking on the sync-lock icon does nothing.
Fixed a bug where the sync-lock icon was redrawn dark when the minimize button is down. Now not redrawn at all in that case.
Added some clarifying comments, especially about the term "Label" as used in TrackPanel.*.
Fixed bug Martyn noticed, where clicking on the sync-lock icon caused the track to (un)minimize. This was because TrackInfo::GetMinimizeRect() was still returning the full size, which I had just adjusted in TrackInfo::DrawMinimize(), so the capture test in other places was wrong. Moved the size adjustment into TrackInfo::GetMinimizeRect().
Also got rid of unused bool minimized parameters of TrackInfo::GetMinimizeRect() and TrackInfo::DrawMinimize(). It wasn't used at all in TrackInfo::GetMinimizeRect(), so I replaced it with bIsSyncLockSelected, so it can determine whether to reduce the width to give room for the sync-lock icon. For TrackInfo::DrawMinimize(), it was unnecessary, because the track was also getting passed in, so no need to call t->GetMinimized() in every call to DrawMinimize() -- just call it within DrawMinimize().
final but it's a big improvement. Reversed a couple changes from
original indication scheme that are no longer necessary. Unfortunately
it's really hard to remove colors from AllThemeResources.h.