mirror of
				https://github.com/cookiengineer/audacity
				synced 2025-10-31 06:03:49 +01: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:
		| @@ -57,6 +57,16 @@ | |||||||
| // DA: Enables dark audacity theme and customisations. | // DA: Enables dark audacity theme and customisations. | ||||||
| //#define EXPERIMENTAL_DA | //#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. | // Define this so that sync-lock tiles shine through spectrogram. | ||||||
| // The spectrogram pastes a bitmap over the tiles. | // The spectrogram pastes a bitmap over the tiles. | ||||||
| // This makes it use alpha blending, most transparent where least intense. | // This makes it use alpha blending, most transparent where least intense. | ||||||
|   | |||||||
| @@ -3499,7 +3499,7 @@ void TrackPanelCellIterator::UpdateRect() | |||||||
|          } |          } | ||||||
|          case CellType::VRuler: |          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; |                mRect.x = kTrackInfoWidth; | ||||||
|                // Right edge of the VRuler is inactive. |                // Right edge of the VRuler is inactive. | ||||||
|                mRect.width = mPanel->GetLeftOffset() - mRect.x -kGuard; |                mRect.width = mPanel->GetLeftOffset() - mRect.x -kGuard; | ||||||
|   | |||||||
| @@ -87,7 +87,7 @@ void TracksBehaviorsPrefs::PopulateOrExchange(ShuttleGui & S) | |||||||
| #endif | #endif | ||||||
|       S.TieCheckBox(_("Enable Vertical Zooming"), |       S.TieCheckBox(_("Enable Vertical Zooming"), | ||||||
|                     wxT("/GUI/VerticalZooming"), |                     wxT("/GUI/VerticalZooming"), | ||||||
|                     false); |                     CFG_DA(!) true); | ||||||
|  |  | ||||||
|       S.AddSpace(10); |       S.AddSpace(10); | ||||||
|  |  | ||||||
|   | |||||||
| @@ -41,7 +41,7 @@ bool IsDragZooming(int zoomStart, int zoomEnd) | |||||||
| { | { | ||||||
|    const int DragThreshold = 3;// Anything over 3 pixels is a drag, else a click. |    const int DragThreshold = 3;// Anything over 3 pixels is a drag, else a click. | ||||||
|    bool bVZoom; |    bool bVZoom; | ||||||
|    gPrefs->Read(wxT("/GUI/VerticalZooming"), &bVZoom, false); |    gPrefs->Read(wxT("/GUI/VerticalZooming"), &bVZoom, CFG_DA(!) true); | ||||||
|    return bVZoom && (abs(zoomEnd - zoomStart) > DragThreshold); |    return bVZoom && (abs(zoomEnd - zoomStart) > DragThreshold); | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -607,7 +607,7 @@ HitTestPreview WaveTrackVZoomHandle::HitPreview(const wxMouseState &state) | |||||||
|       ::MakeCursor(wxCURSOR_MAGNIFIER, ZoomOutCursorXpm, 19, 15); |       ::MakeCursor(wxCURSOR_MAGNIFIER, ZoomOutCursorXpm, 19, 15); | ||||||
|    static  wxCursor arrowCursor{ wxCURSOR_ARROW }; |    static  wxCursor arrowCursor{ wxCURSOR_ARROW }; | ||||||
|    bool bVZoom; |    bool bVZoom; | ||||||
|    gPrefs->Read(wxT("/GUI/VerticalZooming"), &bVZoom, false); |    gPrefs->Read(wxT("/GUI/VerticalZooming"), &bVZoom, CFG_DA(!) true); | ||||||
|    bVZoom &= !state.RightIsDown(); |    bVZoom &= !state.RightIsDown(); | ||||||
|    const auto message = bVZoom ?  |    const auto message = bVZoom ?  | ||||||
|       _("Click to vertically zoom in. Shift-click to zoom out. Drag to specify a zoom region.") : |       _("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> |       std::unique_ptr<PopupMenuTable::Menu> | ||||||
|          pMenu(PopupMenuTable::BuildMenu(pParent, pTable, &data)); |          pMenu(PopupMenuTable::BuildMenu(pParent, pTable, &data)); | ||||||
|       bool bVZoom; |       bool bVZoom; | ||||||
|       gPrefs->Read(wxT("/GUI/VerticalZooming"), &bVZoom, false); |       gPrefs->Read(wxT("/GUI/VerticalZooming"), &bVZoom, CFG_DA(!) true); | ||||||
|  |  | ||||||
|       // Accelerators only if zooming enabled. |       // Accelerators only if zooming enabled. | ||||||
|       if( !bVZoom ) |       if( !bVZoom ) | ||||||
| @@ -705,7 +705,7 @@ UIHandle::Result WaveTrackVZoomHandle::Release | |||||||
|    } |    } | ||||||
|    else{ |    else{ | ||||||
|       bool bVZoom; |       bool bVZoom; | ||||||
|       gPrefs->Read(wxT("/GUI/VerticalZooming"), &bVZoom, false); |       gPrefs->Read(wxT("/GUI/VerticalZooming"), &bVZoom, CFG_DA(!) true); | ||||||
|       // Ignore Capture Lost event  |       // Ignore Capture Lost event  | ||||||
|       bVZoom &= event.GetId() != kCaptureLostEventId; |       bVZoom &= event.GetId() != kCaptureLostEventId; | ||||||
|       // shiftDown | rightUp | ZoomKind |       // shiftDown | rightUp | ZoomKind | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user