diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-02-28 18:26:07 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-02-28 18:26:07 +0000 |
| commit | 3eb403dc8f6d6e39af8259947e41a4e011ba1980 (patch) | |
| tree | e886fb2b3c4c141a55921cbab7a6bbfe7920325a /src | |
| parent | 51d86b751db4333e124eac06d36fc22e7f540f50 (diff) | |
Fix overlapping labels when there is no audio in a project.
Diffstat (limited to 'src')
| -rw-r--r-- | src/wx/timeline_labels_view.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wx/timeline_labels_view.cc b/src/wx/timeline_labels_view.cc index fa52657c1..c9aaef1e4 100644 --- a/src/wx/timeline_labels_view.cc +++ b/src/wx/timeline_labels_view.cc @@ -24,6 +24,7 @@ #include <wx/graphics.h> using std::list; +using std::min; using std::max; TimelineLabelsView::TimelineLabelsView (Timeline& tl) @@ -59,5 +60,5 @@ TimelineLabelsView::do_paint (wxGraphicsContext* gc, list<dcpomatic::Rect<int> > gc->SetFont (gc->CreateFont(wxNORMAL_FONT->Bold(), wxColour (0, 0, 0))); gc->DrawText (_("Video"), 0, h / 2); gc->DrawText (_("Subtitles"), 0, 3 * h / 2); - gc->DrawText (_("Audio"), 0, h + _timeline.tracks() * h / 2); + gc->DrawText (_("Audio"), 0, h + max (_timeline.tracks(), 2) * h / 2); } |
