summaryrefslogtreecommitdiff
path: root/src/wx/timeline_time_axis_view.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-02-25 22:24:39 +0000
committerCarl Hetherington <cth@carlh.net>2016-02-25 22:24:39 +0000
commit07789030fb4ec7d48d14c2cbee0b32f616d6d93d (patch)
tree2792b02fbcd1e443708e369bc34d2dd7a9c13db4 /src/wx/timeline_time_axis_view.cc
parentd2e8a683eed6fb82d4d255fffaf571ff27057132 (diff)
Basics of timeline track labels.
Diffstat (limited to 'src/wx/timeline_time_axis_view.cc')
-rw-r--r--src/wx/timeline_time_axis_view.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wx/timeline_time_axis_view.cc b/src/wx/timeline_time_axis_view.cc
index bbaf5fde2..ce37ec659 100644
--- a/src/wx/timeline_time_axis_view.cc
+++ b/src/wx/timeline_time_axis_view.cc
@@ -34,7 +34,7 @@ TimelineTimeAxisView::TimelineTimeAxisView (Timeline& tl, int y)
dcpomatic::Rect<int>
TimelineTimeAxisView::bbox () const
{
- return dcpomatic::Rect<int> (0, _y - 4, _timeline.width(), 24);
+ return dcpomatic::Rect<int> (_timeline.tracks_position().x, _y - 4, _timeline.width(), 24);
}
void
@@ -74,7 +74,7 @@ TimelineTimeAxisView::do_paint (wxGraphicsContext* gc, list<dcpomatic::Rect<int>
}
wxGraphicsPath path = gc->CreatePath ();
- path.MoveToPoint (_timeline.x_offset(), _y);
+ path.MoveToPoint (_timeline.tracks_position().x, _y);
path.AddLineToPoint (_timeline.width(), _y);
gc->StrokePath (path);
@@ -102,7 +102,7 @@ TimelineTimeAxisView::do_paint (wxGraphicsContext* gc, list<dcpomatic::Rect<int>
wxDouble str_leading;
gc->GetTextExtent (str, &str_width, &str_height, &str_descent, &str_leading);
- int const tx = _timeline.x_offset() + t.seconds() * pps;
+ int const tx = _timeline.tracks_position().x + t.seconds() * pps;
if ((tx + str_width) < _timeline.width()) {
gc->DrawText (str, time_x (t), _y + 16);
}