1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-20 14:20:06 +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

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