projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
51d86b7
)
Fix overlapping labels when there is no audio in a project.
author
Carl Hetherington
<cth@carlh.net>
Sun, 28 Feb 2016 18:26:07 +0000
(18:26 +0000)
committer
Carl Hetherington
<cth@carlh.net>
Sun, 28 Feb 2016 18:26:07 +0000
(18:26 +0000)
src/wx/timeline_labels_view.cc
patch
|
blob
|
history
diff --git
a/src/wx/timeline_labels_view.cc
b/src/wx/timeline_labels_view.cc
index fa52657c1dfad5bdbc71eaca7050b27cfe7e9d32..c9aaef1e4aa864e04804c25f352ac7f20df1ca23 100644
(file)
--- 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);
}