1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-20 14:20:06 +02:00

Tweak TCP minimize button Position

It now doesn't impinge on the bottom edge of the TCP, and it is left aligned flush with the left edge.
Minimum track height increased accordingly.
This commit is contained in:
James Crook 2017-06-10 10:10:38 +01:00
parent cea3ed5f24
commit d8a71c40eb
2 changed files with 6 additions and 6 deletions

View File

@ -133,10 +133,10 @@ void Track::SetOwner(TrackList *list, TrackNodePointer node)
int Track::GetMinimizedHeight() const int Track::GetMinimizedHeight() const
{ {
if (GetLink()) { if (GetLink()) {
return 21; return 22;
} }
return 42; return 44;
} }
int Track::GetIndex() const int Track::GetIndex() const

View File

@ -5277,9 +5277,9 @@ std::pair< int, int > CalcItemY( const TCPLine *pLines, unsigned iItem )
// Items for the bottom of the panel, listed bottom-upwards // Items for the bottom of the panel, listed bottom-upwards
// As also with the top items, the extra space is below the item // As also with the top items, the extra space is below the item
const TCPLine commonTrackTCPBottomLines[] = { const TCPLine commonTrackTCPBottomLines[] = {
// PRL: -1!! This preserves present 2.2.0 behavior. The increase of // The '0' avoids impinging on bottom line of TCP
// kTrackInfoBtnSize by 2 made the button impinge on the border of TCP. // Use -1 if you do want to do so.
{ kItemSyncLock | kItemMinimize, kTrackInfoBtnSize, -1 }, { kItemSyncLock | kItemMinimize, kTrackInfoBtnSize, 0 },
{ 0, 0, 0 } { 0, 0, 0 }
}; };
@ -9433,7 +9433,7 @@ void TrackInfo::GetVelocityRect(const wxPoint &topleft, wxRect & dest) const
void TrackInfo::GetMinimizeRect(const wxRect & rect, wxRect &dest) const void TrackInfo::GetMinimizeRect(const wxRect & rect, wxRect &dest) const
{ {
const int space = 3; const int space = 0;// was 3.
dest.x = rect.x + space; dest.x = rect.x + space;
auto results = CalcBottomItemY auto results = CalcBottomItemY
( commonTrackTCPBottomLines, kItemMinimize, rect.height); ( commonTrackTCPBottomLines, kItemMinimize, rect.height);