1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-05 15:09:08 +02:00

Remove link icon from TrackInfo title bar.

This commit is contained in:
v.audacity 2010-07-27 01:25:44 +00:00
parent 981366b2b6
commit 2f139f524d

View File

@ -7316,18 +7316,11 @@ void TrackInfo::DrawTitleBar(wxDC * dc, const wxRect r, Track * t,
GetTitleBarRect(r, bev); GetTitleBarRect(r, bev);
bev.Inflate(-1, -1); bev.Inflate(-1, -1);
// Load small link icon bitmap for future use
wxBitmap link(theTheme.Image(bmpLinkTP));
// Draw title text // Draw title text
SetTrackInfoFont(dc); SetTrackInfoFont(dc);
wxString titleStr = t->GetName(); wxString titleStr = t->GetName();
int allowableWidth = GetTitleWidth() - 38 - kLeftInset; int allowableWidth = GetTitleWidth() - 38 - kLeftInset;
// Make room for the link icon if necessary
if (t->IsSynchroSelected())
allowableWidth -= link.GetWidth() - 2; // let it closer than to the arrow
long textWidth, textHeight; long textWidth, textHeight;
dc->GetTextExtent(titleStr, &textWidth, &textHeight); dc->GetTextExtent(titleStr, &textWidth, &textHeight);
while (textWidth > allowableWidth) { while (textWidth > allowableWidth) {
@ -7359,15 +7352,16 @@ void TrackInfo::DrawTitleBar(wxDC * dc, const wxRect r, Track * t,
s); s);
// Link icon: drawn to the left of the dropdown arrow // Link icon: drawn to the left of the dropdown arrow
if (t->IsSynchroSelected()) { //vvvvv May want to put this elsewhere in the TrackInfo.
wxBitmap link(theTheme.Image(bmpLinkTP)); //wxBitmap link(theTheme.Image(bmpLinkTP));
dc->DrawBitmap(link, //if (t->IsSynchroSelected()) {
// Arrow's left minus our width and an extra px // wxBitmap link(theTheme.Image(bmpLinkTP));
bev.GetRight() - s - 3 - link.GetWidth() - 1, // dc->DrawBitmap(link,
bev.y + 1, // // Arrow's left minus our width and an extra px
true); // bev.GetRight() - s - 3 - link.GetWidth() - 1,
} // bev.y + 1,
// true);
//}
AColor::BevelTrackInfo(*dc, !down, bev); AColor::BevelTrackInfo(*dc, !down, bev);
} }