Add FilmViewer::time_until_next_frame.
[dcpomatic.git] / src / wx / time_picker.cc
index ee591023bdbda95af34436528e738098ba4e8a78..295bbd52d327c6a0c3db226c9756bf3c96733bc8 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2016 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2016-2018 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
@@ -20,6 +20,7 @@
 
 #include "time_picker.h"
 #include "wx_util.h"
+#include "static_text.h"
 #include <dcp/locale_convert.h>
 #include <wx/spinctrl.h>
 #include <boost/bind.hpp>
@@ -43,10 +44,10 @@ TimePicker::TimePicker (wxWindow* parent, wxDateTime time)
 
        wxBoxSizer* sizer = new wxBoxSizer (wxHORIZONTAL);
        _hours = new wxSpinCtrl (this, wxID_ANY, wxT(""), wxDefaultPosition, size);
-       sizer->Add (_hours, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP);
-       sizer->Add (new wxStaticText (this, wxID_ANY, wxT (":")), 0, wxALIGN_CENTER_VERTICAL);
+       sizer->Add (_hours, 1, wxEXPAND | wxLEFT | wxALIGN_CENTER_VERTICAL, 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, DCPOMATIC_SIZER_GAP);
+       sizer->Add (_minutes, 1, wxEXPAND | wxRIGHT | wxALIGN_CENTER_VERTICAL, DCPOMATIC_SIZER_GAP);
 
        SetSizerAndFit (sizer);
 
@@ -57,8 +58,8 @@ TimePicker::TimePicker (wxWindow* parent, wxDateTime time)
        _minutes->SetValue (time.GetMinute ());
        _minutes->SetRange (0, 59);
 
-       _hours->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, (bind (&TimePicker::spin_changed, this)));
-       _minutes->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, (bind (&TimePicker::spin_changed, this)));
+       _hours->Bind (wxEVT_SPINCTRL, (bind (&TimePicker::spin_changed, this)));
+       _minutes->Bind (wxEVT_SPINCTRL, (bind (&TimePicker::spin_changed, this)));
 }
 
 void