1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-15 07:40:23 +02:00

Improve sync-lock

Adds modifier key to temporarily override sync-lock
Improves the workflow when using synced tracks
Changes Background of synced tracks
Makes locked background tile without gaps and offsets

Signed-off-by: akleja <storspov@gmail.com>
This commit is contained in:
akleja 2021-07-28 14:12:07 +02:00
parent 2eca2e39ca
commit b0d45a4a65
7 changed files with 5180 additions and 5202 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -334,12 +334,18 @@ void TrackArt::DrawSyncLockTiles(
TrackPanelDrawingContext &context, const wxRect &rect )
{
const auto dc = &context.dc;
dc->SetBrush(*wxTRANSPARENT_BRUSH);
dc->SetPen( wxPen( theTheme.Colour( clrSelected )) );
// AColor::Line(*dc, rect.x, rect.y, rect.x, rect.height);
// AColor::Line(*dc, rect.width, rect.y, rect.width, rect.height);
// dc->DrawRectangle(rect.x, rect.y, rect.width, rect.height);
dc->SetPen(*wxTRANSPARENT_PEN);
wxBitmap syncLockBitmap(theTheme.Image(bmpSyncLockSelTile));
// Grid spacing is a bit smaller than actual image size
int gridW = syncLockBitmap.GetWidth() - 6;
int gridH = syncLockBitmap.GetHeight() - 8;
int gridW = syncLockBitmap.GetWidth();
int gridH = syncLockBitmap.GetHeight() - 2;
// Horizontal position within the grid, modulo its period
int blockX = (rect.x / gridW) % 5;
@ -394,12 +400,6 @@ void TrackArt::DrawSyncLockTiles(
if (yy + height > rect.height)
height = rect.height - yy;
// AWD: draw blocks according to our pattern
if ((blockX == 0 && blockY == 0) || (blockX == 2 && blockY == 1) ||
(blockX == 4 && blockY == 2) || (blockX == 1 && blockY == 3) ||
(blockX == 3 && blockY == 4))
{
// Do we need to get a sub-bitmap?
if (width != syncLockBitmap.GetWidth() || height != syncLockBitmap.GetHeight()) {
wxBitmap subSyncLockBitmap =
@ -409,7 +409,6 @@ void TrackArt::DrawSyncLockTiles(
else {
dc->DrawBitmap(syncLockBitmap, rect.x + xx, rect.y + yy, true);
}
}
// Updates for next row
if (extraRow) {

View File

@ -155,6 +155,7 @@ void MousePrefs::CreateList()
AddItem(XO("Left-Drag"), XO("Time-Shift"),XO("Move clip left/right or between tracks"));
AddItem(XO("Shift-Left-Drag"), XO("Time-Shift"),XO("Move all clips in track left/right"));
AddItem(CTRL + XO("-Left-Drag"),XO("Time-Shift"),XO("Move clip up/down between tracks"));
AddItem(XO("Alt-Left-Drag"), XO("Time-Shift"),XO("Move clips ignoring Sync-lock"));
AddItem(XO("Left-Drag"),
/* i18n-hint: The envelope is a curve that controls the audio loudness.*/

View File

@ -518,13 +518,14 @@ UIHandle::Result TimeShiftHandle::Click
// just do shifting of one whole track
}
bool syncLocked = (event.AltDown()) ? false : ProjectSettings::Get( *pProject ).IsSyncLocked();
mClipMoveState.Init( *pProject, *pTrack,
hitTestResult,
std::move( pShifter ),
clickTime,
viewInfo, trackList,
ProjectSettings::Get( *pProject ).IsSyncLocked() );
viewInfo, trackList, syncLocked);
mSlideUpDownOnly = event.CmdDown() && !multiToolModeActive;
mRect = rect;