mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-16 06:03:49 +01:00
VZooming Changes
1: Guard zone 8 pixels wide in VRuler to reduce risk of accidental use. 2: VerticalZooming preference, for VRuler zooming, off by default, 3: Enabled Paul's right-click menu in VRuler with some extra presets (x2 and x0.5) 4: Rearranged some messy code with lots of ifs to use a switch. Also, with EXPERIMENTAL_HALF_WAVE defined we now get a 'half wave' option in the VRuler menu, that shows the wave top half. We also use it in collapsed waves (and collapsing and restoring a WaveTrack will get you back to normal zoom.
This commit is contained in:
@@ -1572,7 +1572,9 @@ void TrackPanel::OnCaptureLost(wxMouseCaptureLostEvent & WXUNUSED(event))
|
||||
{
|
||||
ClearTargets();
|
||||
|
||||
// This is bad. We are lying abou the event by saying it is a mouse up.
|
||||
wxMouseEvent e(wxEVT_LEFT_UP);
|
||||
e.SetId( kCaptureLostEventId );
|
||||
|
||||
e.m_x = mMouseMostRecentX;
|
||||
e.m_y = mMouseMostRecentY;
|
||||
@@ -3496,11 +3498,14 @@ void TrackPanelCellIterator::UpdateRect()
|
||||
break;
|
||||
}
|
||||
case CellType::VRuler:
|
||||
mRect.x = kTrackInfoWidth;
|
||||
// Only half the VRuler is active.
|
||||
mRect.width = (mPanel->GetLeftOffset() - mRect.x)/2.0;
|
||||
mRect.y += kTopMargin;
|
||||
mRect.height -= (kBottomMargin + kTopMargin);
|
||||
{
|
||||
const int kGuard = 8; // 8 pixels to reduce risk of VZooming accidentally
|
||||
mRect.x = kTrackInfoWidth;
|
||||
// Right edge of the VRuler is inactive.
|
||||
mRect.width = mPanel->GetLeftOffset() - mRect.x -kGuard;
|
||||
mRect.y += kTopMargin;
|
||||
mRect.height -= (kBottomMargin + kTopMargin);
|
||||
}
|
||||
break;
|
||||
case CellType::Resizer: {
|
||||
// The resizer region encompasses the bottom margin proper to this
|
||||
|
||||
Reference in New Issue
Block a user