diff options
| author | Carl Hetherington <cth@carlh.net> | 2017-10-13 23:39:16 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2017-10-13 23:39:16 +0100 |
| commit | 0c54ae8d45449b20afda7a3bc006a90ed0c6952a (patch) | |
| tree | 8dda7d1df3bfde7ef8824170e645a094363d47b1 /src | |
| parent | a615ba5e8616b054ab65a0762e09588ae44ff0e6 (diff) | |
Colour axis labels in the audio plot (#835).
Diffstat (limited to 'src')
| -rw-r--r-- | src/wx/audio_dialog.cc | 1 | ||||
| -rw-r--r-- | src/wx/audio_plot.cc | 10 | ||||
| -rw-r--r-- | src/wx/audio_plot.h | 2 |
3 files changed, 13 insertions, 0 deletions
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> 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)); } 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: |
