1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-02 16:49:41 +02:00

VZoom cfg defaults different for Audacity and DA.

VZooming remains on by default in Audacity itself.
Also kGuard (the gurard zone in the VRuler) reduced from 8 pixels to 5pixels
following feedback from Steve.
This commit is contained in:
James Crook 2017-12-12 21:06:09 +00:00
parent 516af71782
commit 3379b4e499
4 changed files with 16 additions and 6 deletions

View File

@ -57,6 +57,16 @@
// DA: Enables dark audacity theme and customisations.
//#define EXPERIMENTAL_DA
// These CFG macros allow easy distinction between Audacity and DA defaults.
#ifdef EXPERIMENTAL_DA
#define CFG_A( x )
#define CFG_DA( x ) x
#else
#define CFG_A( x ) x
#define CFG_DA( x )
#endif
// Define this so that sync-lock tiles shine through spectrogram.
// The spectrogram pastes a bitmap over the tiles.
// This makes it use alpha blending, most transparent where least intense.

View File

@ -3499,7 +3499,7 @@ void TrackPanelCellIterator::UpdateRect()
}
case CellType::VRuler:
{
const int kGuard = 8; // 8 pixels to reduce risk of VZooming accidentally
const int kGuard = 5; // 5 pixels to reduce risk of VZooming accidentally
mRect.x = kTrackInfoWidth;
// Right edge of the VRuler is inactive.
mRect.width = mPanel->GetLeftOffset() - mRect.x -kGuard;

View File

@ -87,7 +87,7 @@ void TracksBehaviorsPrefs::PopulateOrExchange(ShuttleGui & S)
#endif
S.TieCheckBox(_("Enable Vertical Zooming"),
wxT("/GUI/VerticalZooming"),
false);
CFG_DA(!) true);
S.AddSpace(10);

View File

@ -41,7 +41,7 @@ bool IsDragZooming(int zoomStart, int zoomEnd)
{
const int DragThreshold = 3;// Anything over 3 pixels is a drag, else a click.
bool bVZoom;
gPrefs->Read(wxT("/GUI/VerticalZooming"), &bVZoom, false);
gPrefs->Read(wxT("/GUI/VerticalZooming"), &bVZoom, CFG_DA(!) true);
return bVZoom && (abs(zoomEnd - zoomStart) > DragThreshold);
}
@ -607,7 +607,7 @@ HitTestPreview WaveTrackVZoomHandle::HitPreview(const wxMouseState &state)
::MakeCursor(wxCURSOR_MAGNIFIER, ZoomOutCursorXpm, 19, 15);
static wxCursor arrowCursor{ wxCURSOR_ARROW };
bool bVZoom;
gPrefs->Read(wxT("/GUI/VerticalZooming"), &bVZoom, false);
gPrefs->Read(wxT("/GUI/VerticalZooming"), &bVZoom, CFG_DA(!) true);
bVZoom &= !state.RightIsDown();
const auto message = bVZoom ?
_("Click to vertically zoom in. Shift-click to zoom out. Drag to specify a zoom region.") :
@ -682,7 +682,7 @@ UIHandle::Result WaveTrackVZoomHandle::Release
std::unique_ptr<PopupMenuTable::Menu>
pMenu(PopupMenuTable::BuildMenu(pParent, pTable, &data));
bool bVZoom;
gPrefs->Read(wxT("/GUI/VerticalZooming"), &bVZoom, false);
gPrefs->Read(wxT("/GUI/VerticalZooming"), &bVZoom, CFG_DA(!) true);
// Accelerators only if zooming enabled.
if( !bVZoom )
@ -705,7 +705,7 @@ UIHandle::Result WaveTrackVZoomHandle::Release
}
else{
bool bVZoom;
gPrefs->Read(wxT("/GUI/VerticalZooming"), &bVZoom, false);
gPrefs->Read(wxT("/GUI/VerticalZooming"), &bVZoom, CFG_DA(!) true);
// Ignore Capture Lost event
bVZoom &= event.GetId() != kCaptureLostEventId;
// shiftDown | rightUp | ZoomKind