X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Ftime_picker.cc;h=295bbd52d327c6a0c3db226c9756bf3c96733bc8;hb=9c1bb2e5ca7c80c4e26b1b2e41159aa171360a94;hp=ee591023bdbda95af34436528e738098ba4e8a78;hpb=c27d6f3a7e6c79c60ffac7c616dd3a3431819862;p=dcpomatic.git diff --git a/src/wx/time_picker.cc b/src/wx/time_picker.cc index ee591023b..295bbd52d 100644 --- a/src/wx/time_picker.cc +++ b/src/wx/time_picker.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2016 Carl Hetherington + Copyright (C) 2016-2018 Carl Hetherington 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 #include #include @@ -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