1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-04-02 20:37:38 +02:00

GetVRulerWidth, GetLabelWidth, GetLeftOffset out of TrackPanel.h...

... And some things demoted from ViewInfo to ZoomInfo, related to x coordinates
only
This commit is contained in:
Paul Licameli
2019-06-21 11:26:13 -04:00
parent baf31dd72e
commit f87dfd43c1
11 changed files with 62 additions and 60 deletions

View File

@@ -414,7 +414,7 @@ unsigned operator()
// We're converting pixel positions to times,
// counting pixels from the left edge of the track.
auto &trackPanel = TrackPanel::Get( *pProject );
int trackLeftEdge = trackPanel.GetLeftOffset();
int trackLeftEdge = viewInfo.GetLeftOffset();
// Time corresponding to mouse position
wxCoord xx;
@@ -769,7 +769,7 @@ void ProjectWindow::Init()
auto hs = std::make_unique<wxBoxSizer>(wxHORIZONTAL);
// Bottom scrollbar
hs->Add(trackPanel.GetLeftOffset() - 1, 0);
hs->Add(viewInfo.GetLeftOffset() - 1, 0);
hs->Add(mHsbar, 1, wxALIGN_BOTTOM);
hs->Add(mVsbar->GetSize().GetWidth(), 0);
bs->Add(hs.release(), 0, wxEXPAND | wxALIGN_LEFT);
@@ -791,7 +791,7 @@ void ProjectWindow::Init()
trackPanel.SetFocus();
FixScrollbars();
ruler.SetLeftOffset(trackPanel.GetLeftOffset()); // bevel on AdornedRuler
ruler.SetLeftOffset(viewInfo.GetLeftOffset()); // bevel on AdornedRuler
//
// Set the Icon