mirror of
https://github.com/cookiengineer/audacity
synced 2025-09-17 16:50:26 +02:00
Fix off-by-one width in TrackPanel::GetTracksUsableArea()
This commit is contained in:
parent
4b028995cb
commit
e7c7bb84a9
@ -1074,7 +1074,7 @@ void TrackPanel::SelectTrackLength(Track *t)
|
||||
void TrackPanel::GetTracksUsableArea(int *width, int *height) const
|
||||
{
|
||||
GetSize(width, height);
|
||||
*width -= GetLabelWidth();
|
||||
*width -= GetLeftOffset();
|
||||
*width -= kRightMargin;
|
||||
*width = std::max(0, *width);
|
||||
}
|
||||
|
@ -165,6 +165,7 @@ class AUDACITY_DLL_API TrackPanel:public wxPanel {
|
||||
|
||||
virtual int GetLeftOffset() const { return GetLabelWidth() + 1;}
|
||||
|
||||
// Width and height, relative to upper left corner at (GetLeftOffset(), 0)
|
||||
virtual void GetTracksUsableArea(int *width, int *height) const;
|
||||
|
||||
virtual void SelectNone();
|
||||
|
Loading…
x
Reference in New Issue
Block a user