diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-01-12 13:24:52 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-01-13 00:06:28 +0000 |
| commit | 67a404fff364c6e1fa02eab270755895ba0e1fe8 (patch) | |
| tree | 06de621b56c0b3beac7f15316273caef57e9d7e1 /src/wx | |
| parent | 99b4e0705e9007aabfec08ea2c8d1a84eda0d32e (diff) | |
Use an enum for the effect in SubtitleContent.
Diffstat (limited to 'src/wx')
| -rw-r--r-- | src/wx/subtitle_appearance_dialog.cc | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/src/wx/subtitle_appearance_dialog.cc b/src/wx/subtitle_appearance_dialog.cc index 5cb668e7b..929bc6006 100644 --- a/src/wx/subtitle_appearance_dialog.cc +++ b/src/wx/subtitle_appearance_dialog.cc @@ -157,12 +157,16 @@ SubtitleAppearanceDialog::SubtitleAppearanceDialog (wxWindow* parent, shared_ptr _colour->SetColour (wxColour (255, 255, 255)); } - if (_content->subtitle->outline()) { + switch (_content->subtitle->effect()) { + case dcp::NONE: + _effect->SetSelection (NONE); + break; + case dcp::BORDER: _effect->SetSelection (OUTLINE); - } else if (_content->subtitle->shadow()) { + break; + case dcp::SHADOW: _effect->SetSelection (SHADOW); - } else { - _effect->SetSelection (NONE); + break; } optional<dcp::Colour> effect_colour = _content->subtitle->effect_colour(); @@ -195,8 +199,17 @@ SubtitleAppearanceDialog::apply () } else { _content->subtitle->unset_colour (); } - _content->subtitle->set_outline (_effect->GetSelection() == OUTLINE); - _content->subtitle->set_shadow (_effect->GetSelection() == SHADOW); + switch (_effect->GetSelection()) { + case NONE: + _content->subtitle->set_effect (dcp::NONE); + break; + case OUTLINE: + _content->subtitle->set_effect (dcp::BORDER); + break; + case SHADOW: + _content->subtitle->set_effect (dcp::SHADOW); + break; + } if (_force_effect_colour->GetValue ()) { wxColour const ec = _effect_colour->GetColour (); _content->subtitle->set_effect_colour (dcp::Colour (ec.Red(), ec.Green(), ec.Blue())); |
