summaryrefslogtreecommitdiff
path: root/src/wx
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-07-08 01:30:39 +0100
committerCarl Hetherington <cth@carlh.net>2016-07-08 01:48:50 +0100
commitac2fa2172c30c234a19628d7a9ae696e435a56db (patch)
treec9cfc40955708732ee1f7ad5e0d23feb099cc607 /src/wx
parent61f81caacd7d45ace5c1a52c1f7b4f8afac5eb80 (diff)
Support shadow in subtitles (#911).
Diffstat (limited to 'src/wx')
-rw-r--r--src/wx/text_subtitle_appearance_dialog.cc26
-rw-r--r--src/wx/text_subtitle_appearance_dialog.h7
2 files changed, 22 insertions, 11 deletions
diff --git a/src/wx/text_subtitle_appearance_dialog.cc b/src/wx/text_subtitle_appearance_dialog.cc
index 30402a63f..a826cbc66 100644
--- a/src/wx/text_subtitle_appearance_dialog.cc
+++ b/src/wx/text_subtitle_appearance_dialog.cc
@@ -34,20 +34,29 @@ TextSubtitleAppearanceDialog::TextSubtitleAppearanceDialog (wxWindow* parent, sh
_colour = new wxColourPickerCtrl (this, wxID_ANY);
add (_colour);
- _outline = new wxCheckBox (this, wxID_ANY, _("Outline"));
+ wxRadioButton* no_effect = new wxRadioButton (this, wxID_ANY, _("No effect"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP);
+ add (no_effect);
+ add_spacer ();
+
+ _outline = new wxRadioButton (this, wxID_ANY, _("Outline"));
add (_outline);
add_spacer ();
- add (_("Outline colour"), true);
- _outline_colour = new wxColourPickerCtrl (this, wxID_ANY);
- add (_outline_colour);
+ _shadow = new wxRadioButton (this, wxID_ANY, _("Shadow"));
+ add (_shadow);
+ add_spacer ();
+
+ add (_("Outline / shadow colour"), true);
+ _effect_colour = new wxColourPickerCtrl (this, wxID_ANY);
+ add (_effect_colour);
layout ();
_colour->SetColour (wxColour (_content->colour().r, _content->colour().g, _content->colour().b));
_outline->SetValue (_content->outline ());
- _outline_colour->SetColour (
- wxColour (_content->outline_colour().r, _content->outline_colour().g, _content->outline_colour().b)
+ _shadow->SetValue (_content->shadow ());
+ _effect_colour->SetColour (
+ wxColour (_content->effect_colour().r, _content->effect_colour().g, _content->effect_colour().b)
);
}
@@ -57,6 +66,7 @@ TextSubtitleAppearanceDialog::apply ()
wxColour const c = _colour->GetColour ();
_content->set_colour (dcp::Colour (c.Red(), c.Green(), c.Blue()));
_content->set_outline (_outline->GetValue ());
- wxColour const oc = _outline_colour->GetColour ();
- _content->set_outline_colour (dcp::Colour (oc.Red(), oc.Green(), oc.Blue()));
+ _content->set_shadow (_shadow->GetValue ());
+ wxColour const ec = _effect_colour->GetColour ();
+ _content->set_effect_colour (dcp::Colour (ec.Red(), ec.Green(), ec.Blue()));
}
diff --git a/src/wx/text_subtitle_appearance_dialog.h b/src/wx/text_subtitle_appearance_dialog.h
index feecae543..c67ec8756 100644
--- a/src/wx/text_subtitle_appearance_dialog.h
+++ b/src/wx/text_subtitle_appearance_dialog.h
@@ -21,7 +21,7 @@
#include "table_dialog.h"
#include <boost/shared_ptr.hpp>
-class wxCheckBox;
+class wxRadioButton;
class wxColourPickerCtrl;
class SubtitleContent;
@@ -34,8 +34,9 @@ public:
private:
wxColourPickerCtrl* _colour;
- wxCheckBox* _outline;
- wxColourPickerCtrl* _outline_colour;
+ wxRadioButton* _outline;
+ wxRadioButton* _shadow;
+ wxColourPickerCtrl* _effect_colour;
boost::shared_ptr<SubtitleContent> _content;
};