projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1424e41
)
Fix crash on scaling the ccap window to be very small.
author
Carl Hetherington
<cth@carlh.net>
Wed, 25 Jul 2018 22:50:15 +0000
(23:50 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Wed, 25 Jul 2018 22:50:15 +0000
(23:50 +0100)
src/wx/closed_captions_dialog.cc
patch
|
blob
|
history
diff --git
a/src/wx/closed_captions_dialog.cc
b/src/wx/closed_captions_dialog.cc
index 857db66a8b396c13de0f8c2ff273ba30d6491b0b..1e13f867a4dae952cb16c069fedb33f067834cce 100644
(file)
--- a/
src/wx/closed_captions_dialog.cc
+++ b/
src/wx/closed_captions_dialog.cc
@@
-23,6
+23,7
@@
#include <boost/bind.hpp>
using std::list;
+using std::max;
using std::cout;
using std::make_pair;
using boost::shared_ptr;
@@
-57,7
+58,7
@@
ClosedCaptionsDialog::paint ()
dc.SetTextForeground (*wxWHITE);
/* Choose a font which fits vertically */
- int const line_height =
dc.GetSize().GetHeight() / _num_lines
;
+ int const line_height =
max (8, dc.GetSize().GetHeight() / _num_lines)
;
wxFont font (*wxNORMAL_FONT);
font.SetPixelSize (wxSize (0, line_height * 0.8));
dc.SetFont (font);