Dolby is apparently recreating all their certificates (as they will soon expire)...
[dcpomatic.git] / src / wx / audio_dialog.cc
index a4f1dd514884621b4431b388fb2a628cae38a7fc..4cd308ab1cebf852b93d782064f69a5e11d42f02 100644 (file)
@@ -114,7 +114,7 @@ AudioDialog::AudioDialog (wxWindow* parent, shared_ptr<Film> film, FilmViewer& v
                _channel_checkbox[i] = new CheckBox (this, std_to_wx(audio_channel_name(i)));
                _channel_checkbox[i]->SetForegroundColour(wxColour(_plot->colour(i)));
                right->Add (_channel_checkbox[i], 0, wxEXPAND | wxALL, 3);
-               _channel_checkbox[i]->Bind (wxEVT_CHECKBOX, boost::bind (&AudioDialog::channel_clicked, this, _1));
+               _channel_checkbox[i]->bind(&AudioDialog::channel_clicked, this, _1);
        }
 
        show_or_hide_channel_checkboxes ();
@@ -133,7 +133,7 @@ AudioDialog::AudioDialog (wxWindow* parent, shared_ptr<Film> film, FilmViewer& v
        for (int i = 0; i < AudioPoint::COUNT; ++i) {
                _type_checkbox[i] = new CheckBox (this, types[i]);
                right->Add (_type_checkbox[i], 0, wxEXPAND | wxALL, 3);
-               _type_checkbox[i]->Bind (wxEVT_CHECKBOX, boost::bind (&AudioDialog::type_clicked, this, _1));
+               _type_checkbox[i]->bind(&AudioDialog::type_clicked, this, _1);
        }
 
        {
@@ -399,10 +399,13 @@ AudioDialog::setup_statistics ()
                        )
                );
 
+       wxColour const peaking = *wxRED;
+       wxColour const not_peaking = gui_is_dark() ? *wxWHITE : *wxBLACK;
+
        if (peak_dB > -3) {
-               _sample_peak->SetForegroundColour (wxColour (255, 0, 0));
+               _sample_peak->SetForegroundColour(peaking);
        } else {
-               _sample_peak->SetForegroundColour (wxColour (0, 0, 0));
+               _sample_peak->SetForegroundColour(not_peaking);
        }
 
        if (_analysis->overall_true_peak()) {
@@ -412,9 +415,9 @@ AudioDialog::setup_statistics ()
                _true_peak->SetLabel (wxString::Format (_("True peak is %.2fdB"), peak_dB));
 
                if (peak_dB > -3) {
-                       _true_peak->SetForegroundColour (wxColour (255, 0, 0));
+                       _true_peak->SetForegroundColour(peaking);
                } else {
-                       _true_peak->SetForegroundColour (wxColour (0, 0, 0));
+                       _true_peak->SetForegroundColour(not_peaking);
                }
        }