summaryrefslogtreecommitdiff
path: root/src/wx/audio_dialog.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-10-16 22:22:22 +0200
committerCarl Hetherington <cth@carlh.net>2022-10-18 20:37:00 +0200
commit1350e2f5cf87a419136c10370e46fd7d82f27efc (patch)
tree426b6239310c156ebc2114b2fba1a804e8adfcc8 /src/wx/audio_dialog.cc
parent93a781c8b9d34effd376537268970193b9b01479 (diff)
Fix colouring of audio plot in dark mode.
Diffstat (limited to 'src/wx/audio_dialog.cc')
-rw-r--r--src/wx/audio_dialog.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/wx/audio_dialog.cc b/src/wx/audio_dialog.cc
index a4f1dd514..e433f45fd 100644
--- a/src/wx/audio_dialog.cc
+++ b/src/wx/audio_dialog.cc
@@ -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);
}
}