, _history_separator (0)
, _view_full_screen (0)
, _view_dual_screen (0)
+ , _main_sizer (new wxBoxSizer(wxVERTICAL))
{
dcpomatic_log.reset (new NullLog());
void setup_main_sizer (Config::PlayerMode mode)
{
- wxSizer* main_sizer = new wxBoxSizer (wxVERTICAL);
+ _main_sizer->Detach (_viewer->panel());
+ _main_sizer->Detach (_controls);
+ _main_sizer->Detach (_info);
if (mode != Config::PLAYER_MODE_DUAL) {
- main_sizer->Add (_viewer->panel(), 1, wxEXPAND | wxALIGN_CENTER_VERTICAL);
+ _main_sizer->Add (_viewer->panel(), 1, wxEXPAND);
}
- main_sizer->Add (_controls, mode == Config::PLAYER_MODE_DUAL ? 1 : 0, wxEXPAND | wxALL, 6);
- main_sizer->Add (_info, 0, wxEXPAND | wxALL, 6);
- _overall_panel->SetSizer (main_sizer);
+ _main_sizer->Add (_controls, mode == Config::PLAYER_MODE_DUAL ? 1 : 0, wxEXPAND | wxALL, 6);
+ _main_sizer->Add (_info, 0, wxEXPAND | wxALL, 6);
+ _overall_panel->SetSizer (_main_sizer);
_overall_panel->Layout ();
}
switch (Config::instance()->image_display()) {
case 0:
_dual_screen->Move (0, 0);
- Move (wxDisplay(0).GetClientArea().GetWidth(), 0);
+ Move (wxDisplay(0U).GetClientArea().GetWidth(), 0);
break;
case 1:
- _dual_screen->Move (wxDisplay(0).GetClientArea().GetWidth(), 0);
+ _dual_screen->Move (wxDisplay(0U).GetClientArea().GetWidth(), 0);
// (0, 0) doesn't seem to work for some strange reason
Move (8, 8);
break;
wxMenuItem* _tools_verify;
wxMenuItem* _view_full_screen;
wxMenuItem* _view_dual_screen;
+ wxSizer* _main_sizer;
};
static const wxCmdLineEntryDesc command_line_description[] = {
tested_by.Add (wxT ("Wolfgang Woehl"));
add_section (_("Tested by"), tested_by);
- sizer->Add (_notebook, wxSizerFlags().Centre().Border(wxALL, 16).Expand());
+ sizer->Add (_notebook, wxSizerFlags().Centre().Border(wxALL, 16));
overall_sizer->Add (sizer);
int c = 0;
for (size_t i = 0; i < credits.Count(); ++i) {
- add_label_to_sizer (sizers[c], panel, credits[i], false);
+ add_label_to_vertical_sizer (sizers[c], panel, credits[i], false);
++c;
if (c == N) {
c = 0;
{
wxStaticText* m = new StaticText (this, _("Channels"));
m->SetFont (subheading_font);
- right->Add (m, 1, wxALIGN_CENTER_VERTICAL | wxTOP | wxBOTTOM, 16);
+ right->Add (m, 1, wxTOP | wxBOTTOM, 16);
}
for (int i = 0; i < MAX_DCP_AUDIO_CHANNELS; ++i) {
{
wxStaticText* m = new StaticText (this, _("Type"));
m->SetFont (subheading_font);
- right->Add (m, 1, wxALIGN_CENTER_VERTICAL | wxTOP, 16);
+ right->Add (m, 1, wxTOP, 16);
}
wxString const types[] = {
{
wxStaticText* m = new StaticText (this, _("Smoothing"));
m->SetFont (subheading_font);
- right->Add (m, 1, wxALIGN_CENTER_VERTICAL | wxTOP, 16);
+ right->Add (m, 1, wxTOP, 16);
}
_smoothing = new wxSlider (this, wxID_ANY, AudioPlot::max_smoothing / 2, 1, AudioPlot::max_smoothing);
_frame_rate_choice->Show ();
_frame_rate_spin->Hide ();
}
-
- _frame_rate_sizer->Layout ();
}
wxPanel *
_frame_rate_label = create_label (panel, _("Frame Rate"), true);
_frame_rate_choice = new wxChoice (panel, wxID_ANY);
- _frame_rate_sizer = new wxBoxSizer (wxHORIZONTAL);
- _frame_rate_sizer->Add (_frame_rate_choice, 1, wxALIGN_CENTER_VERTICAL);
_frame_rate_spin = new wxSpinCtrl (panel, wxID_ANY);
- _frame_rate_sizer->Add (_frame_rate_spin, 1, wxALIGN_CENTER_VERTICAL);
setup_frame_rate_widget ();
_best_frame_rate = new Button (panel, _("Use best"));
- _frame_rate_sizer->Add (_best_frame_rate, 1, wxALIGN_CENTER_VERTICAL);
_three_d = new CheckBox (panel, _("3D"));
_gauge->SetMinSize (wxSize (0, -1));
_gauge_message->Add (_gauge, 0, wxEXPAND | wxLEFT | wxRIGHT);
_message = new StaticText (_container, wxT(" \n "), wxDefaultPosition, wxDefaultSize, wxST_ELLIPSIZE_MIDDLE);
- _gauge_message->Add (_message, 1, wxEXPAND | wxALIGN_CENTER_VERTICAL | wxALL, 6);
+ _gauge_message->Add (_message, 1, wxEXPAND | wxALL, 6);
_table->Insert (n, _gauge_message, 1, wxEXPAND | wxLEFT | wxRIGHT);
++n;
/* Sub-heading: Screens */
wxStaticText* h = new StaticText (this, _("Screens"));
h->SetFont (subheading_font);
- left->Add (h, 0, wxALIGN_CENTER_VERTICAL | wxBOTTOM, DCPOMATIC_SIZER_Y_GAP);
+ left->Add (h, 0, wxBOTTOM, DCPOMATIC_SIZER_Y_GAP);
_screens = new ScreensPanel (this);
left->Add (_screens, 1, wxEXPAND | wxBOTTOM, DCPOMATIC_SIZER_Y_GAP);
/// TRANSLATORS: translate the word "Timing" here; do not include the "KDM|" prefix
h = new StaticText (this, S_("KDM|Timing"));
h->SetFont (subheading_font);
- right->Add (h, 0, wxALIGN_CENTER_VERTICAL, DCPOMATIC_SIZER_Y_GAP * 2);
+ right->Add (h, 0, 0, DCPOMATIC_SIZER_Y_GAP * 2);
_timing = new KDMTimingPanel (this);
right->Add (_timing);
/* Sub-heading: CPL */
h = new StaticText (this, _("CPL"));
h->SetFont (subheading_font);
- right->Add (h, 0, wxALIGN_CENTER_VERTICAL, DCPOMATIC_SIZER_Y_GAP * 2);
+ right->Add (h, 0, 0, DCPOMATIC_SIZER_Y_GAP * 2);
vector<CPLSummary> cpls;
BOOST_FOREACH (CPLSummary const & i, film->cpls()) {
/* Sub-heading: Output */
h = new StaticText (this, _("Output"));
h->SetFont (subheading_font);
- right->Add (h, 0, wxALIGN_CENTER_VERTICAL | wxTOP, DCPOMATIC_SIZER_Y_GAP * 2);
+ right->Add (h, 0, wxTOP, DCPOMATIC_SIZER_Y_GAP * 2);
_output = new KDMOutputPanel (this, film->interop ());
right->Add (_output, 0, wxEXPAND | wxTOP, DCPOMATIC_SIZER_GAP);
wxBoxSizer* sizer = new wxBoxSizer (wxHORIZONTAL);
_hours = new wxSpinCtrl (this, wxID_ANY, wxT(""), wxDefaultPosition, size);
- sizer->Add (_hours, 1, wxEXPAND | wxLEFT | wxALIGN_CENTER_VERTICAL, DCPOMATIC_SIZER_GAP);
+ sizer->Add (_hours, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP);
sizer->Add (new StaticText (this, wxT (":")), 0, wxALIGN_CENTER_VERTICAL);
_minutes = new wxSpinCtrl (this, wxID_ANY, wxT(""), wxDefaultPosition, size);
- sizer->Add (_minutes, 1, wxEXPAND | wxRIGHT | wxALIGN_CENTER_VERTICAL, DCPOMATIC_SIZER_GAP);
+ sizer->Add (_minutes, 1, wxEXPAND | wxRIGHT, DCPOMATIC_SIZER_GAP);
SetSizerAndFit (sizer);
conf.in_msg = 1
wx_version = conf.check_cfg(package='wxwidgets', path=wx_config, args='--version').strip()
conf.im_msg = 0
- if not wx_version.startswith('3.0.'):
- conf.fatal('wxwidgets version 3.0.x is required; %s found' % wx_version)
+ if not wx_version.startswith('3.'):
+ conf.fatal('wxwidgets version 3.x.y is required; %s found' % wx_version)
+
+ config = conf.check_cfg(package='wxwidgets', path=wx_config, args='--selected-config').strip()
+ if config.find('gtk2') != -1:
+ conf.check_cfg(package='gtk+-2.0', args='--cflags --libs', uselib_store='GTK', mandatory=True)
try:
conf.check_cfg(msg='Checking for RtAudio using pkg-config',
return m;
}
+
+/* Hack: this is the same but has different default flags */
+wxStaticText *
+add_label_to_vertical_sizer (wxSizer* s, wxWindow* p, wxString t, bool left, int prop, int flags)
+{
+#ifdef __WXOSX__
+ if (left) {
+ flags |= wxALIGN_RIGHT;
+ }
+#endif
+ wxStaticText* m = create_label (p, t, left);
+ s->Add (m, prop, flags, 6);
+ return m;
+}
+
+
wxStaticText *
#ifdef __WXOSX__
add_label_to_sizer (wxSizer* s, wxStaticText* t, bool left, int prop, int flags)
extern bool confirm_dialog (wxWindow *, wxString);
extern wxStaticText* create_label (wxWindow* p, wxString t, bool left);
extern wxStaticText* add_label_to_sizer (wxSizer *, wxWindow *, wxString, bool left, int prop = 0, int flags = wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT);
+extern wxStaticText* add_label_to_vertical_sizer (wxSizer *, wxWindow *, wxString, bool left, int prop = 0, int flags = wxLEFT | wxRIGHT);
extern wxStaticText* add_label_to_sizer (wxSizer *, wxStaticText *, bool left, int prop = 0, int flags = wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT);
extern wxStaticText* add_label_to_sizer (wxGridBagSizer *, wxWindow *, wxString, bool, wxGBPosition, wxGBSpan span = wxDefaultSpan);
extern wxStaticText* add_label_to_sizer (wxGridBagSizer *, wxStaticText *, bool, wxGBPosition, wxGBSpan span = wxDefaultSpan);
conf.env.append_value('CXXFLAGS', '-DLINUX_SHARE_PREFIX="%s/share/dcpomatic2"' % conf.env['INSTALL_PREFIX'])
conf.env.append_value('CXXFLAGS', '-DDCPOMATIC_LINUX')
conf.env.append_value('CXXFLAGS', ['-Wlogical-op', '-Wno-deprecated-copy'])
- if not conf.env.DISABLE_GUI:
- conf.check_cfg(package='gtk+-2.0', args='--cflags --libs', uselib_store='GTK', mandatory=True)
# OSX
if conf.env.TARGET_OSX: