1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-30 15:18:42 +02:00

Sync-Lock:

Remove tiles from rulers. They were interfering with visibility of ruler marks.

Restore the icon to TrackInfo, but not in the title bar. Instead, when sync-lock is on and the track IsSyncLockSelected(), decrease the width of the minimize button and show the icon to the right of it. This way, it shows even when the track is minimized.
This commit is contained in:
v.audacity 2010-08-24 19:32:54 +00:00
parent 70145b8457
commit cfe369f232
3 changed files with 22 additions and 54 deletions

View File

@ -208,8 +208,8 @@ from there. Audacity will look for a file called "Pause.png".
DEFINE_IMAGE( bmpAudacityLogo, wxImage( 215, 190 ), wxT("AudacityLogo"));
DEFINE_IMAGE( bmpAudacityLogo48x48, wxImage( 48, 48 ), wxT("AudacityLogo48x48"));
DEFINE_IMAGE( bmpLinkSelect, wxImage(27, 27), wxT("LinkSelect"));
DEFINE_IMAGE( bmpLinkTP, wxImage(12, 12), wxT("LinkTP"));
DEFINE_IMAGE( bmpSyncLockSelTile, wxImage(27, 27), wxT("SyncLockSelTile"));
DEFINE_IMAGE( bmpSyncLockIcon, wxImage(12, 12), wxT("SyncLockIcon"));
#ifdef OLD_COLOURS
DEFINE_COLOUR( clrBlank, wxColour(214, 214, 214), wxT("Blank"));
@ -328,13 +328,3 @@ from there. Audacity will look for a file called "Pause.png".
DEFINE_COLOUR( clrTrackInfoSyncLockSel, wxColour( 64, 64, 64), wxT("TrackInfoSyncLockSel"));
DEFINE_COLOUR( clrSelTranslucent, wxColour(104, 104, 148, 127), wxT("SelTranslucent"));
// Indentation settings for Vim and Emacs and unique identifier for Arch, a
// version control system. Please do not modify past this point.
//
// Local Variables:
// c-basic-offset: 3
// indent-tabs-mode: nil
// End:
//
// vim: et sts=3 sw=3
// arch-tag: b8a9d878-fa18-4cba-a5ce-3c61b5d77f0e

View File

@ -2642,7 +2642,7 @@ void TrackArtist::SetSpectrumLogMaxFreq(int freq)
// Draws the sync-lock bitmap, tiled; always draws stationary relative to the DC
void TrackArtist::DrawSyncLockTiles(wxDC *dc, wxRect r)
{
wxBitmap syncLockBitmap(theTheme.Image(bmpLinkSelect));
wxBitmap syncLockBitmap(theTheme.Image(bmpSyncLockSelTile));
int xOffset = r.x % syncLockBitmap.GetWidth();
if (xOffset < 0) xOffset += syncLockBitmap.GetWidth();
@ -2678,14 +2678,3 @@ void TrackArtist::DrawSyncLockTiles(wxDC *dc, wxRect r)
}
}
// Indentation settings for Vim and Emacs and unique identifier for Arch, a
// version control system. Please do not modify past this point.
//
// Local Variables:
// c-basic-offset: 3
// indent-tabs-mode: nil
// End:
//
// vim: et sts=3 sw=3
// arch-tag: cd156c5b-b867-48eb-9289-03d21bdf14e5

View File

@ -5135,13 +5135,14 @@ void TrackPanel::DrawOutside(Track * t, wxDC * dc, const wxRect rec,
mTrackInfo.DrawBackground(dc, r, t->GetSelected(), bIsWave, labelw, vrul);
// Vaughan, 2010-08-24: No longer doing this.
// Draw sync-lock tiles in ruler area.
if (t->IsSyncLockSelected()) {
wxRect tileFill = r;
tileFill.x = GetVRulerOffset();
tileFill.width = GetVRulerWidth();
TrackArtist::DrawSyncLockTiles(dc, tileFill);
}
//if (t->IsSyncLockSelected()) {
// wxRect tileFill = r;
// tileFill.x = GetVRulerOffset();
// tileFill.width = GetVRulerWidth();
// TrackArtist::DrawSyncLockTiles(dc, tileFill);
//}
DrawBordersAroundTrack(t, dc, r, labelw, vrul);
DrawShadow(t, dc, r);
@ -7352,18 +7353,6 @@ void TrackInfo::DrawTitleBar(wxDC * dc, const wxRect r, Track * t,
bev.y + ((bev.height - (s / 2)) / 2),
s);
// Link icon: drawn to the left of the dropdown arrow
//vvvvv May want to put this elsewhere in the TrackInfo.
//wxBitmap link(theTheme.Image(bmpLinkTP));
//if (t->IsSyncLockSelected()) {
// wxBitmap link(theTheme.Image(bmpLinkTP));
// dc->DrawBitmap(link,
// // Arrow's left minus our width and an extra px
// bev.GetRight() - s - 3 - link.GetWidth() - 1,
// bev.y + 1,
// true);
//}
AColor::BevelTrackInfo(*dc, !down, bev);
}
@ -7420,7 +7409,18 @@ void TrackInfo::DrawMinimize(wxDC * dc, const wxRect r, Track * t, bool down, bo
{
wxRect bev;
GetMinimizeRect(r, bev, minimized);
wxBitmap syncLockBitmap(theTheme.Image(bmpSyncLockIcon));
if (t->IsSyncLockSelected())
{
// GetMinimizeRect() sets height to 15, and syncLockBitmap is 12x12.
bev.width -= syncLockBitmap.GetWidth() + 4;
dc->DrawBitmap(syncLockBitmap,
bev.GetRight() + 4,
bev.y + 2,
true);
}
// Clear background to get rid of previous arrow
AColor::MediumTrackInfo(dc, t->GetSelected());
dc->DrawRectangle(bev);
@ -7597,14 +7597,3 @@ LWSlider * TrackInfo::PanSlider(int trackIndex)
return mPans[trackIndex - mSliderOffset];
}
// Indentation settings for Vim and Emacs and unique identifier for Arch, a
// version control system. Please do not modify past this point.
//
// Local Variables:
// c-basic-offset: 3
// indent-tabs-mode: nil
// End:
//
// vim: et sts=3 sw=3
// arch-tag: 5bb3d18e-9ba7-47c3-beef-29f5d791442a