Colour axis labels in the audio plot (#835).
authorCarl Hetherington <cth@carlh.net>
Fri, 13 Oct 2017 22:39:16 +0000 (23:39 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 13 Oct 2017 22:39:16 +0000 (23:39 +0100)
ChangeLog
src/wx/audio_dialog.cc
src/wx/audio_plot.cc
src/wx/audio_plot.h

index 2189d80..72abd51 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-13  Carl Hetherington  <cth@carlh.net>
+
+       * Colour axis labels in the audio plot (#835).
+
 2017-10-09  Carl Hetherington  <cth@carlh.net>
 
        * Version 2.11.26 released.
index 8a38c8a..73ddd4c 100644 (file)
@@ -97,6 +97,7 @@ AudioDialog::AudioDialog (wxWindow* parent, shared_ptr<Film> film, shared_ptr<Co
 
        for (int i = 0; i < _channels; ++i) {
                _channel_checkbox[i] = new wxCheckBox (this, wxID_ANY, 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));
        }
index c19ba94..fe031aa 100644 (file)
@@ -319,3 +319,13 @@ AudioPlot::get_point (int channel, int point) const
 
        return p;
 }
+
+/** @param n Channel index.
+ *  @return Colour used by that channel in the plot.
+ */
+wxColour
+AudioPlot::colour (int n) const
+{
+       DCPOMATIC_ASSERT (n < int(_colours.size()));
+       return _colours[n];
+}
index 580bc2d..2f4b224 100644 (file)
@@ -38,6 +38,8 @@ public:
        void set_message (wxString);
        void set_gain_correction (double gain);
 
+       wxColour colour (int n) const;
+
        static const int max_smoothing;
 
 private: