1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-04 14:39:08 +02:00

Restored bevels on TrackInfo.

Aesthetic choice, currently disabled in run up to 2.1.3.
Lowest edge of bevels now hidden correctly on smaller panels (if bevels enabled).
This commit is contained in:
James Crook 2016-08-21 18:17:02 +01:00
parent d5712a462f
commit be66873fca

View File

@ -8925,8 +8925,15 @@ void TrackInfo::DrawBordersWithin(wxDC* dc, const wxRect & rect, bool bHasMuteSo
minimizeRect.x + minimizeRect.width, minimizeRect.y - 1); minimizeRect.x + minimizeRect.width, minimizeRect.y - 1);
} }
//#define USE_BEVELS
#ifdef USE_BEVELS
void TrackInfo::DrawBackground(wxDC * dc, const wxRect & rect, bool bSelected,
bool bHasMuteSolo, const int labelw, const int vrul) const
#else
void TrackInfo::DrawBackground(wxDC * dc, const wxRect & rect, bool bSelected, void TrackInfo::DrawBackground(wxDC * dc, const wxRect & rect, bool bSelected,
bool WXUNUSED(bHasMuteSolo), const int labelw, const int WXUNUSED(vrul)) const bool WXUNUSED(bHasMuteSolo), const int labelw, const int WXUNUSED(vrul)) const
#endif
{ {
// fill in label // fill in label
wxRect fill = rect; wxRect fill = rect;
@ -8934,20 +8941,28 @@ void TrackInfo::DrawBackground(wxDC * dc, const wxRect & rect, bool bSelected,
AColor::MediumTrackInfo(dc, bSelected); AColor::MediumTrackInfo(dc, bSelected);
dc->DrawRectangle(fill); dc->DrawRectangle(fill);
// Vaughan, 2010-09-16: No more bevels around controls area. Now only around buttons.
//if( bHasMuteSolo ) #ifdef USE_BEVELS
//{ if( bHasMuteSolo )
// fill=wxRect( rect.x+1, rect.y+17, vrul-6, 32); {
// AColor::BevelTrackInfo( *dc, true, fill ); int ylast = rect.height-20;
// int ybutton = wxMin(32,ylast-17);
// fill=wxRect( rect.x+1, rect.y+67, fill.width, rect.height-87); int ybuttonEnd = 67;
// AColor::BevelTrackInfo( *dc, true, fill );
//} fill=wxRect( rect.x+1, rect.y+17, vrul-6, ybutton);
//else AColor::BevelTrackInfo( *dc, true, fill );
//{
// fill=wxRect( rect.x+1, rect.y+17, vrul-6, rect.height-37); if( ybuttonEnd < ylast ){
// AColor::BevelTrackInfo( *dc, true, fill ); fill=wxRect( rect.x+1, rect.y+ybuttonEnd, fill.width, ylast - ybuttonEnd);
//} AColor::BevelTrackInfo( *dc, true, fill );
}
}
else
{
fill=wxRect( rect.x+1, rect.y+17, vrul-6, rect.height-37);
AColor::BevelTrackInfo( *dc, true, fill );
}
#endif
} }
void TrackInfo::GetTrackControlsRect(const wxRect & rect, wxRect & dest) const void TrackInfo::GetTrackControlsRect(const wxRect & rect, wxRect & dest) const