No-op: remove all trailing whitespace.
[dcpomatic.git] / src / wx / gain_calculator_dialog.cc
index 22e6b447ab1bb96f69f0946986b0c0f4b3d8651f..133d84c21719cfa30b0718898636987f3f43a5ce 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 using namespace boost;
 
 GainCalculatorDialog::GainCalculatorDialog (wxWindow* parent)
-       : wxDialog (parent, wxID_ANY, _("Gain Calculator"))
+       : TableDialog (parent, _("Gain Calculator"), 2, true)
 {
-       wxFlexGridSizer* table = new wxFlexGridSizer (2, 6, 6);
-       table->AddGrowableCol (1, 1);
+       add (_("I want to play this back at fader"), true);
+       _wanted = add (new wxTextCtrl (this, wxID_ANY, wxT (""), wxDefaultPosition, wxDefaultSize, 0, wxTextValidator (wxFILTER_NUMERIC)));
 
-       add_label_to_sizer (table, this, _("I want to play this back at fader"));
-       _wanted = new wxTextCtrl (this, wxID_ANY, wxT (""), wxDefaultPosition, wxDefaultSize, 0, wxTextValidator (wxFILTER_NUMERIC));
-       table->Add (_wanted, 1, wxEXPAND);
+       add (_("But I have to use fader"), true);
+       _actual = add (new wxTextCtrl (this, wxID_ANY, wxT (""), wxDefaultPosition, wxDefaultSize, 0, wxTextValidator (wxFILTER_NUMERIC)));
 
-       add_label_to_sizer (table, this, _("But I have to use fader"));
-       _actual = new wxTextCtrl (this, wxID_ANY, wxT (""), wxDefaultPosition, wxDefaultSize, 0, wxTextValidator (wxFILTER_NUMERIC));
-       table->Add (_actual, 1, wxEXPAND);
-
-       wxBoxSizer* overall_sizer = new wxBoxSizer (wxVERTICAL);
-       overall_sizer->Add (table, 1, wxEXPAND | wxALL, 6);
-
-       wxSizer* buttons = CreateSeparatedButtonSizer (wxOK);
-       if (buttons) {
-               overall_sizer->Add (buttons, wxSizerFlags().Expand().DoubleBorder());
-       }
-       
-       SetSizer (overall_sizer);
-       overall_sizer->SetSizeHints (this);
+       layout ();
 }
 
 float
@@ -55,7 +41,7 @@ GainCalculatorDialog::wanted_fader () const
        if (_wanted->GetValue().IsEmpty()) {
                return 0;
        }
-       
+
        return lexical_cast<float> (wx_to_std (_wanted->GetValue ()));
 }