1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-04-30 07:39:42 +02:00

Merge pull request from akleja/sync-lock

Fixes a number of small theme coloring mistakes.
Changes GraphLines color in light theme to black.
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>
Reference-to: https://github.com/tenacityteam/tenacity/pull/404
This commit is contained in:
Emily Mabrey 2021-08-08 01:10:40 -04:00 committed by GitHub
commit f7692f7884
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 6989 additions and 7014 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;