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 2189d8086dd9033985647ed36864106401f68d47..72abd516e02f7a1af4e00ba30a3336adade39a2e 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 8a38c8a87edb2ef9fe8a0f1f8cb09339d91c3931..73ddd4c01221aa0792b40cd9d688a234d8bd96e5 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 c19ba946a6c362efdf09adfa98b6442303ecac61..fe031aaac28aa5b8d095d6241206b74f0bbc4fb9 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 580bc2d5a532f5b4ef2021a727305aad6b1772dc..2f4b224e853854cc295321982da7e4606a776422 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: