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

Fix positioning of solo button.

- No longer jumps right when clicked.
- Right edge is now aligned with track name drop down right edge.
- When using just a mute button, the (larger) button is centered.
This commit is contained in:
James Crook 2017-06-09 14:26:27 +01:00
parent cecb704abb
commit c11fd1d63f

View File

@ -5566,7 +5566,7 @@ bool TrackPanel::MuteSoloFunc(Track * t, wxRect rect, int x, int y,
bool solo)
{
wxRect buttonRect;
rect.width +=4;
//rect.width +=4;
mTrackInfo.GetMuteSoloRect(rect, buttonRect, solo, HasSoloButton(), t);
if ( TrackInfo::HideTopItem( rect, buttonRect ) )
return false;
@ -9386,15 +9386,15 @@ void TrackInfo::GetMuteSoloRect(const wxRect & rect, wxRect & dest, bool solo, b
dest.width = rect.width / 2 + 1;
if( solo ) {
dest.x += dest.width;
dest.width = rect.width - dest.width;
dest.width = rect.width - dest.width+1;
}
}
else
{
// PRL: Was symmetry within the TCP borders intended?
// If so, get rid of + 6 and + 1
// Larger button, symmetrically placed intended.
// On windows this gives 15 pixels each side.
dest.width = rect.width - 2 * kTrackInfoBtnSize + 6;
dest.x = rect.x + kTrackInfoBtnSize + 1;
dest.x = rect.x + kTrackInfoBtnSize -3;
}
if( bSameRow || !solo )