From 0c54ae8d45449b20afda7a3bc006a90ed0c6952a Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 13 Oct 2017 23:39:16 +0100 Subject: [PATCH] Colour axis labels in the audio plot (#835). --- ChangeLog | 4 ++++ src/wx/audio_dialog.cc | 1 + src/wx/audio_plot.cc | 10 ++++++++++ src/wx/audio_plot.h | 2 ++ 4 files changed, 17 insertions(+) diff --git a/ChangeLog b/ChangeLog index 2189d8086..72abd516e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2017-10-13 Carl Hetherington + + * Colour axis labels in the audio plot (#835). + 2017-10-09 Carl Hetherington * Version 2.11.26 released. diff --git a/src/wx/audio_dialog.cc b/src/wx/audio_dialog.cc index 8a38c8a87..73ddd4c01 100644 --- a/src/wx/audio_dialog.cc +++ b/src/wx/audio_dialog.cc @@ -97,6 +97,7 @@ AudioDialog::AudioDialog (wxWindow* parent, shared_ptr film, shared_ptrSetForegroundColour(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)); } diff --git a/src/wx/audio_plot.cc b/src/wx/audio_plot.cc index c19ba946a..fe031aaac 100644 --- a/src/wx/audio_plot.cc +++ b/src/wx/audio_plot.cc @@ -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]; +} diff --git a/src/wx/audio_plot.h b/src/wx/audio_plot.h index 580bc2d5a..2f4b224e8 100644 --- a/src/wx/audio_plot.h +++ b/src/wx/audio_plot.h @@ -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: -- 2.30.2