mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-17 09:07:41 +02:00
Override TrackPanelDrawable::DrawingArea() properly for track names
This commit is contained in:
parent
71b3fc0647
commit
8905e52ee0
@ -187,6 +187,22 @@ static void DrawTrackName(
|
||||
nameRect.y + MarginY);
|
||||
}
|
||||
|
||||
wxRect CommonTrackView::DrawingArea(
|
||||
TrackPanelDrawingContext &context,
|
||||
const wxRect &rect, const wxRect &panelRect, unsigned iPass )
|
||||
{
|
||||
auto result = rect;
|
||||
if ( iPass == TrackArtist::PassBorders ) {
|
||||
if ( true ) {
|
||||
wxCoord textWidth, textHeight;
|
||||
GetTrackNameExtent( context.dc, FindTrack().get(),
|
||||
&textWidth, &textHeight );
|
||||
result = GetTrackNameRect( rect, textWidth, textHeight );
|
||||
}
|
||||
}
|
||||
return rect;
|
||||
}
|
||||
|
||||
void CommonTrackView::Draw(
|
||||
TrackPanelDrawingContext &context, const wxRect &rect, unsigned iPass )
|
||||
{
|
||||
|
@ -34,6 +34,10 @@ public:
|
||||
void TimeShiftHitTest();
|
||||
|
||||
// TrackPanelDrawable implementation
|
||||
wxRect DrawingArea(
|
||||
TrackPanelDrawingContext &context,
|
||||
const wxRect &rect, const wxRect &panelRect, unsigned iPass ) override;
|
||||
|
||||
void Draw(
|
||||
TrackPanelDrawingContext &context,
|
||||
const wxRect &rect, unsigned iPass ) override;
|
||||
|
Loading…
x
Reference in New Issue
Block a user