Move reel markers to the top of the timeline (#846).
authorCarl Hetherington <cth@carlh.net>
Sun, 24 Apr 2016 23:32:58 +0000 (00:32 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 24 Apr 2016 23:32:58 +0000 (00:32 +0100)
ChangeLog
src/wx/timeline.cc
src/wx/timeline_labels_view.cc

index 04a7a77d59e08d32c0dfccc87ea9fc9603839981..d2b7505ed8978854b63cd073015fd8d28d59cb9c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2016-04-25  Carl Hetherington  <cth@carlh.net>
+
+       * Move the reel markers to the top of the timeline (#846).
+
 2016-04-22  c.hetherington  <cth@carlh.net>
 
        * Arrange buttons to consume less vertical space in the
index 9a86ada1288d71c81981e60281043714af9d1b40..786d70721c5549498ceffbec0314df7039282b0b 100644 (file)
@@ -77,7 +77,7 @@ Timeline::Timeline (wxWindow* parent, ContentPanel* cp, shared_ptr<Film> film)
 
        SetMinSize (wxSize (640, tracks() * track_height() + 96));
 
-       _tracks_position = Position<int> (_labels_view->bbox().width, 8);
+       _tracks_position = Position<int> (_labels_view->bbox().width, 32);
 
        _film_changed_connection = film->Changed.connect (bind (&Timeline::film_changed, this, _1));
        _film_content_changed_connection = film->ContentChanged.connect (bind (&Timeline::film_content_changed, this, _2, _3));
@@ -246,7 +246,7 @@ Timeline::assign_tracks ()
        }
 
        _time_axis_view->set_y (tracks() * track_height() + 64);
-       _reels_view->set_y (tracks() * track_height() + 32);
+       _reels_view->set_y (8);
 }
 
 int
index 9b55c2bd0bcff7349f3e8929d46bd489e5a41707..3a809bfffca3a991582f7cc89fcd03a18a7983b5 100644 (file)
@@ -58,7 +58,7 @@ TimelineLabelsView::do_paint (wxGraphicsContext* gc, list<dcpomatic::Rect<int> >
 {
        int const h = _timeline.track_height ();
        gc->SetFont (gc->CreateFont(wxNORMAL_FONT->Bold(), wxColour (0, 0, 0)));
-       gc->DrawText (_("Video"), 0, h / 2);
-       gc->DrawText (_("Subtitles"), 0, 5 * h / 2);
-       gc->DrawText (_("Audio"), 0, h + max (_timeline.tracks(), 2) * h / 2);
+       gc->DrawText (_("Video"),     0, _timeline.tracks_position().y + h - 8);
+       gc->DrawText (_("Subtitles"), 0, _timeline.tracks_position().y + 5 * h / 2 - 8);
+       gc->DrawText (_("Audio"),     0, _timeline.tracks_position().y + (3 + max (_timeline.tracks(), 3)) * h / 2 - 8);
 }