1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-05 23:19:06 +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);
bev.Inflate(-1, -1);
// Load small link icon bitmap for future use
wxBitmap link(theTheme.Image(bmpLinkTP));
// Draw title text
SetTrackInfoFont(dc);
wxString titleStr = t->GetName();
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;
dc->GetTextExtent(titleStr, &textWidth, &textHeight);
while (textWidth > allowableWidth) {
@ -7359,15 +7352,16 @@ void TrackInfo::DrawTitleBar(wxDC * dc, const wxRect r, Track * t,
s);
// Link icon: drawn to the left of the dropdown arrow
if (t->IsSynchroSelected()) {
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);
}
//vvvvv May want to put this elsewhere in the TrackInfo.
//wxBitmap link(theTheme.Image(bmpLinkTP));
//if (t->IsSynchroSelected()) {
// 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);
}