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

Rewrite the unused DrawBordersWithin...

... Remembering inclusivity of the endpoints in AColor::Line, and avoiding
use of the constant kTrackInfoWidth
This commit is contained in:
Paul Licameli 2017-06-06 15:43:42 -04:00
parent ad4d6d148a
commit 64a0d788a5

View File

@ -9487,13 +9487,13 @@ void TrackInfo::DrawBordersWithin
wxRect buttonRect;
GetTitleBarRect( rect, buttonRect );
AColor::Line
(*dc, rect.x, buttonRect.y + buttonRect.height,
kTrackInfoWidth, buttonRect.y + buttonRect.height);
(*dc, rect.x, buttonRect.y + buttonRect.height,
rect.width - 1, buttonRect.y + buttonRect.height);
// between close box and title bar
AColor::Line
(*dc, buttonRect.x, buttonRect.y,
buttonRect.x, buttonRect.y + buttonRect.height);
buttonRect.x, buttonRect.y + buttonRect.height - 1);
GetMuteSoloRect( rect, buttonRect, false, true, &track );
@ -9503,19 +9503,19 @@ void TrackInfo::DrawBordersWithin
// above mute/solo
AColor::Line
(*dc, rect.x, buttonRect.y,
kTrackInfoWidth, buttonRect.y);
rect.width - 1, buttonRect.y);
// between mute/solo
// Draw this little line; if there is no solo, wide mute button will
// overpaint it later:
AColor::Line
(*dc, buttonRect.x + buttonRect.width, buttonRect.y,
buttonRect.x + buttonRect.width, buttonRect.y + buttonRect.height);
buttonRect.x + buttonRect.width, buttonRect.y + buttonRect.height - 1);
// below mute/solo
AColor::Line
(*dc, rect.x, buttonRect.y + buttonRect.height,
kTrackInfoWidth, buttonRect.y + buttonRect.height);
rect.width - 1, buttonRect.y + buttonRect.height);
}
// left of and above minimize button
@ -9523,10 +9523,10 @@ void TrackInfo::DrawBordersWithin
this->GetMinimizeRect(rect, minimizeRect);
AColor::Line
(*dc, minimizeRect.x - 1, minimizeRect.y,
minimizeRect.x - 1, minimizeRect.y + minimizeRect.height);
minimizeRect.x - 1, minimizeRect.y + minimizeRect.height - 1);
AColor::Line
(*dc, minimizeRect.x, minimizeRect.y - 1,
minimizeRect.x + minimizeRect.width, minimizeRect.y - 1);
(*dc, minimizeRect.x, minimizeRect.y - 1,
minimizeRect.x + minimizeRect.width - 1, minimizeRect.y - 1);
}
//#define USE_BEVELS