From c11fd1d63f0f7beb82a8d2967e343629e74beecb Mon Sep 17 00:00:00 2001 From: James Crook Date: Fri, 9 Jun 2017 14:26:27 +0100 Subject: [PATCH] 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. --- src/TrackPanel.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/TrackPanel.cpp b/src/TrackPanel.cpp index a91eb2156..ee99a80c9 100644 --- a/src/TrackPanel.cpp +++ b/src/TrackPanel.cpp @@ -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 )