expand on Norm's new track name in display

In yesterday’s commit of Norm’s patch to put the full name of the track in the wave we gained a nice GUI enhancement. Of course, I’m never satisfied so I extended it!
sizeANDcolor.png
I can now control both the size and color of the font in the wavetrack display! Here are two examples:
two.png
The code is pretty simple, here is the patch:

Index: src/prefs/GUIPrefs.cpp
===================================================================
--- src/prefs/GUIPrefs.cpp	(revision 11419)
+++ src/prefs/GUIPrefs.cpp	(working copy)
@@ -20,6 +20,7 @@
 #include "../Audacity.h"
 
 #include <wx/defs.h>
+#include <wx/clrpicker.h>
 
 #include "../AudacityApp.h"
 #include "../Languages.h"
@@ -128,6 +129,34 @@
       S.TieCheckBox(_("&Show track name in waveform display"),
                     wxT("/GUI/ShowTrackNameInWaveform"),
                     false);
+      S.StartThreeColumn();
+      {
+         int fontSize = gPrefs->Read(wxT("/GUI/FontSizeForNameInWaveform"), (int)8);
+         mFontSizeCtrl = S.TieNumericTextBox(_("Font size for track name in waveform display"), wxT("/GUI/FontSizeForNameInWaveform"), fontSize, 4);
+         mFontSizeCtrl->SetSizeHints(wxSize(50,20));
+         S.AddUnits(_(" Color: "));
+      }
+      wxPoint fontSizeCtrlLocation = mFontSizeCtrl->GetPosition();
+      fontSizeCtrlLocation.x = 320;
+      fontSizeCtrlLocation.y += 200;
+      wxString red;
+      long redValue = 0;
+      if (gPrefs->Read(wxT("/GUI/FontColorRedForNameInWaveform"), &red))
+         red.ToLong(&redValue);
+
+      wxString green;
+      long greenValue = 0;
+      if (gPrefs->Read(wxT("/GUI/FontColorGreenForNameInWaveform"), &green))
+         green.ToLong(&greenValue);
+
+      wxString blue;
+      long blueValue = 0;
+      if (gPrefs->Read(wxT("/GUI/FontColorBlueForNameInWaveform"), &blue))
+         blue.ToLong(&blueValue);
+
+      wxColour fontColor(redValue, greenValue, blueValue);
+      fontColorPickerCtrl = NULL;
+      fontColorPickerCtrl = new wxColourPickerCtrl((wxWindow *)this, wxID_ANY, fontColor, fontSizeCtrlLocation);
    }
    S.EndStatic();
 
@@ -152,6 +181,26 @@
    ShuttleGui S(this, eIsSavingToPrefs);
    PopulateOrExchange(S);
 
+   //validate user's choice of font size
+   long fontSize = 8;
+   mFontSizeCtrl->GetValue().ToLong(&fontSize);
+   if (fontSize < 8) {
+      fontSize = 8;
+      gPrefs->Write(wxT("/GUI/FontSizeForNameInWaveform"), (int)8);
+      wxMessageBox(_("Font size must be no smaller than 8; setting to 8."));
+   }
+   //else if (fontSize > TOO_BIG) {//how big is too big?
+   if (fontColorPickerCtrl) {
+      wxColour fontColor = fontColorPickerCtrl->GetColour();
+      unsigned char red = fontColor.Red();
+      unsigned char green = fontColor.Green();
+      unsigned char blue = fontColor.Blue();
+      //gPrefs->Write(wxT("/GUI/FontColorRedForNameInWaveform"), red);
+      //gPrefs->Write(wxT("/GUI/FontColorGreenForNameInWaveform"), green);
+      //gPrefs->Write(wxT("/GUI/FontColorBlueForNameInWaveform"), blue);
+      delete fontColorPickerCtrl;
+   }
+
    // If language has changed, we want to change it now, not on the next reboot.
    wxString lang = gPrefs->Read(wxT("/Locale/Language"), wxT(""));
    if (lang == wxT(""))
Index: src/prefs/GUIPrefs.h
===================================================================
--- src/prefs/GUIPrefs.h	(revision 11419)
+++ src/prefs/GUIPrefs.h	(working copy)
@@ -17,6 +17,7 @@
 
 #include <wx/arrstr.h>
 #include <wx/window.h>
+#include <wx/clrpicker.h>
 
 #include "../ShuttleGui.h"
 
@@ -41,6 +42,8 @@
 
    wxArrayString mRangeCodes;
    wxArrayString mRangeChoices;
+   wxTextCtrl * mFontSizeCtrl;
+   wxColourPickerCtrl * fontColorPickerCtrl;
 };
 
 #endif
Index: src/TrackArtist.cpp
===================================================================
--- src/TrackArtist.cpp	(revision 11419)
+++ src/TrackArtist.cpp	(working copy)
@@ -321,7 +321,10 @@
    dc.DrawRectangle(clip);
 #endif
 
-   wxFont labelFont(8, wxSWISS, wxNORMAL, wxNORMAL);
+   
+   int fontSize = gPrefs->Read(wxT("/GUI/FontSizeForNameInWaveform"), (int)8);
+
+   wxFont labelFont(fontSize, wxSWISS, wxNORMAL, wxNORMAL);
    dc.SetFont(labelFont);
    gPrefs->Read(wxT("/GUI/ShowTrackNameInWaveform"), &mbShowTrackNameInWaveform, false);
 
@@ -403,8 +406,29 @@
       case WaveTrack::WaveformDisplay:
          DrawWaveform(wt, dc, r, viewInfo,
                       drawEnvelope, drawSamples, drawSliders, false, muted);
-         if (mbShowTrackNameInWaveform && wt->GetChannel() != Track::RightChannel)    // so left or mono only
+
+         if (mbShowTrackNameInWaveform && wt->GetChannel() != Track::RightChannel) {    // so left or mono only
+            const wxColour& originalForegroundTextColor = dc.GetTextForeground();
+            wxString red;
+            long redValue = 0;
+            if (gPrefs->Read(wxT("/GUI/FontColorRedForNameInWaveform"), &red))
+               red.ToLong(&redValue);
+
+            wxString green;
+            long greenValue = 0;
+            if (gPrefs->Read(wxT("/GUI/FontColorGreenForNameInWaveform"), &green))
+               green.ToLong(&greenValue);
+
+            wxString blue;
+            long blueValue = 0;
+            if (gPrefs->Read(wxT("/GUI/FontColorBlueForNameInWaveform"), &blue))
+               blue.ToLong(&blueValue);
+
+            wxColour newForegroundColor(redValue, greenValue, blueValue);
+            dc.SetTextForeground(newForegroundColor);
             dc.DrawText (wt->GetName(), r.x+10, r.y);  // move right 10 pixels to avoid overwriting <- symbol
+            dc.SetTextForeground(originalForegroundTextColor);
+         }
          break;
       case WaveTrack::WaveformDBDisplay:
          DrawWaveform(wt, dc, r, viewInfo,

There are some problems–we do not have a color picker in ShuttleGUI so we must manage the wxColourPickerCtrl separately. For some reason the picker does not return the picked color (just black) after the panel is destroyed so for now I am resorting to editing the config file directly:

[GUI]
[...]
ShowTrackNameInWaveform=1
FontSizeForNameInWaveform=14
FontColorRedForNameInWaveform=240
FontColorGreenForNameInWaveform=0
FontColorBlueForNameInWaveform=240

Why am I not surprised Ed? :smiley:

WC

Somebody please review and commit Ed’s patch - I can hardly read the track name in the waveform display.

– Bill
Screen Shot 2012-01-19 at 11.39.25 AM.png

new patch with working color storage in prefs

Index: src/prefs/GUIPrefs.cpp
===================================================================
--- src/prefs/GUIPrefs.cpp	(revision 11419)
+++ src/prefs/GUIPrefs.cpp	(working copy)
@@ -20,6 +20,7 @@
 #include "../Audacity.h"
 
 #include <wx/defs.h>
+#include <wx/clrpicker.h>
 
 #include "../AudacityApp.h"
 #include "../Languages.h"
@@ -31,6 +32,7 @@
 GUIPrefs::GUIPrefs(wxWindow * parent)
 :  PrefsPanel(parent, _("Interface"))
 {
+   fontColorPickerCtrl = NULL;
    Populate();
 }
 
@@ -128,6 +130,43 @@
       S.TieCheckBox(_("&Show track name in waveform display"),
                     wxT("/GUI/ShowTrackNameInWaveform"),
                     false);
+      S.StartThreeColumn();
+      {
+         int fontSize = gPrefs->Read(wxT("/GUI/FontSizeForNameInWaveform"), (int)8);
+         mFontSizeCtrl = S.TieNumericTextBox(_("Font size for track name in waveform display"), wxT("/GUI/FontSizeForNameInWaveform"), fontSize, 4);
+         mFontSizeCtrl->SetSizeHints(wxSize(50,20));
+         S.AddUnits(_(" Color: "));
+      }
+      wxPoint fontSizeCtrlLocation = mFontSizeCtrl->GetPosition();
+      fontSizeCtrlLocation.x = 320;
+      fontSizeCtrlLocation.y += 200;
+      wxString red;
+      long redValue = 0;
+      if (gPrefs->Read(wxT("/GUI/FontColorRedForNameInWaveform"), &red))
+         red.ToLong(&redValue);
+
+      wxString green;
+      long greenValue = 0;
+      if (gPrefs->Read(wxT("/GUI/FontColorGreenForNameInWaveform"), &green))
+         green.ToLong(&greenValue);
+
+      wxString blue;
+      long blueValue = 0;
+      if (gPrefs->Read(wxT("/GUI/FontColorBlueForNameInWaveform"), &blue))
+         blue.ToLong(&blueValue);
+
+      wxColour fontColor(redValue, greenValue, blueValue);
+      if (!fontColorPickerCtrl)
+         fontColorPickerCtrl = new wxColourPickerCtrl((wxWindow *)this, wxID_ANY, fontColor, fontSizeCtrlLocation);
+      else {
+         wxColour fontColor = fontColorPickerCtrl->GetColour();
+         unsigned char red = fontColor.Red();
+         unsigned char green = fontColor.Green();
+         unsigned char blue = fontColor.Blue();
+         gPrefs->Write(wxT("/GUI/FontColorRedForNameInWaveform"), red);
+         gPrefs->Write(wxT("/GUI/FontColorGreenForNameInWaveform"), green);
+         gPrefs->Write(wxT("/GUI/FontColorBlueForNameInWaveform"), blue);
+      }
    }
    S.EndStatic();
 
@@ -152,6 +191,17 @@
    ShuttleGui S(this, eIsSavingToPrefs);
    PopulateOrExchange(S);
 
+   //validate user's choice of font size
+   long fontSize = 8;
+   mFontSizeCtrl->GetValue().ToLong(&fontSize);
+   if (fontSize < 8) {
+      fontSize = 8;
+      gPrefs->Write(wxT("/GUI/FontSizeForNameInWaveform"), (int)8);
+      wxMessageBox(_("Font size must be no smaller than 8; setting to 8."));
+   }
+   //else if (fontSize > TOO_BIG) {//how big is too big?
+   if (fontColorPickerCtrl) delete fontColorPickerCtrl;
+
    // If language has changed, we want to change it now, not on the next reboot.
    wxString lang = gPrefs->Read(wxT("/Locale/Language"), wxT(""));
    if (lang == wxT(""))
Index: src/prefs/GUIPrefs.h
===================================================================
--- src/prefs/GUIPrefs.h	(revision 11419)
+++ src/prefs/GUIPrefs.h	(working copy)
@@ -17,6 +17,7 @@
 
 #include <wx/arrstr.h>
 #include <wx/window.h>
+#include <wx/clrpicker.h>
 
 #include "../ShuttleGui.h"
 
@@ -41,6 +42,8 @@
 
    wxArrayString mRangeCodes;
    wxArrayString mRangeChoices;
+   wxTextCtrl * mFontSizeCtrl;
+   wxColourPickerCtrl * fontColorPickerCtrl;
 };
 
 #endif
Index: src/TrackArtist.cpp
===================================================================
--- src/TrackArtist.cpp	(revision 11419)
+++ src/TrackArtist.cpp	(working copy)
@@ -321,7 +321,10 @@
    dc.DrawRectangle(clip);
 #endif
 
-   wxFont labelFont(8, wxSWISS, wxNORMAL, wxNORMAL);
+   
+   int fontSize = gPrefs->Read(wxT("/GUI/FontSizeForNameInWaveform"), (int)8);
+
+   wxFont labelFont(fontSize, wxSWISS, wxNORMAL, wxNORMAL);
    dc.SetFont(labelFont);
    gPrefs->Read(wxT("/GUI/ShowTrackNameInWaveform"), &mbShowTrackNameInWaveform, false);
 
@@ -403,8 +406,29 @@
       case WaveTrack::WaveformDisplay:
          DrawWaveform(wt, dc, r, viewInfo,
                       drawEnvelope, drawSamples, drawSliders, false, muted);
-         if (mbShowTrackNameInWaveform && wt->GetChannel() != Track::RightChannel)    // so left or mono only
+
+         if (mbShowTrackNameInWaveform && wt->GetChannel() != Track::RightChannel) {    // so left or mono only
+            const wxColour& originalForegroundTextColor = dc.GetTextForeground();
+            wxString red;
+            long redValue = 0;
+            if (gPrefs->Read(wxT("/GUI/FontColorRedForNameInWaveform"), &red))
+               red.ToLong(&redValue);
+
+            wxString green;
+            long greenValue = 0;
+            if (gPrefs->Read(wxT("/GUI/FontColorGreenForNameInWaveform"), &green))
+               green.ToLong(&greenValue);
+
+            wxString blue;
+            long blueValue = 0;
+            if (gPrefs->Read(wxT("/GUI/FontColorBlueForNameInWaveform"), &blue))
+               blue.ToLong(&blueValue);
+
+            wxColour newForegroundColor(redValue, greenValue, blueValue);
+            dc.SetTextForeground(newForegroundColor);
             dc.DrawText (wt->GetName(), r.x+10, r.y);  // move right 10 pixels to avoid overwriting <- symbol
+            dc.SetTextForeground(originalForegroundTextColor);
+         }
          break;
       case WaveTrack::WaveformDBDisplay:
          DrawWaveform(wt, dc, r, viewInfo,

Sorry Bill, I doubt you can get any traction on this asking here. I do not post on -QA (nor -devel) but that is probably the best place to ask. I do not understand how/why Norm’s enhancement got committed in the face of the feature freeze and with no QA discussion.

I agree that was irregular, but not entirely unwelcome.
Improved support for long track names has been on the feature requests page for a long time and this is in my opinion a good step in the right direction.
I get the impression that Martyn pushed to get this through and persuaded the other active developers that it was 100% safe.

The inability to see the full track name could perhaps be seen as a bug (possibly part of bug 75 - “… …The fundamental problem is how to both display the full name without having to edit it…”) in which case it is allowed even in a feature freeze.

Also, all of the P1s and P2s are now officially clear, so hopefully we are looking at the release of 2.0 and an end to the current freeze.

It is particularly difficult to read when the track is collapsed. As I wrote to -devel:

While Norm’s fix is a very welcome additional feature, it is difficult to read on some monitors when the track is collapsed, putting the text against a blue “disruptive pattern” background. In fact, for this reason I think that it would still be useful if the track name was visible as a Tool Tip,

to which Gale replied:

I agree with Steve, not least, can all VI screen readers read that text in the waveform on all platforms? Otherwise, it would be an extra step for VI users to open the menu to find the name - they need to know what track they are on more than sighted users do.

How do other editors manage the colour changes according to whether there is a waveform where the name is? Could the name change to white when it has a waveform behind it? Is black the best colour? Some kind of yellow might possibly work for all cases? Yes, after 2.0.

So I think that improvements to “name in track” are on the cards, but just having “name in track” is a start and a reminder that it needs improving.

Would it be possible to have a simpler colour selection option? Say 4 colours in the Preference dialogue itself to choose from?
If so, what colours would be best? I’d suggest black, white, yellow and one other.
A less user friendly option might be for a text box for the Hex colour value.



simpler colour selection option? Say 4 colours in the Preference dialogue itself to choose from

That was my first thought (since we do not have a color picker in ShuttleGUI) but the extra code involved was messy and I could not settle on a reasonable selection of colors !

a text box for the Hex colour value

I also tried that but thought it way too geeky for the general public. It also added a lot of messy code.

In the first patch I could not figure out how to deal with the wxWidgets color picker but I figured that all out eventually for the second patch. Have you tried in on Linux?

My goal would be to lobby James to add the wxWidgets color picker to ShuttleGUI because locating the widget might not work well the way I have it hard-coded right now. Before committing the hard-coded location version the GUI would need testing on all 3 platforms at various screen resolutions.

I’ve not tried it yet, but adding the colour picker may well have more widespread use post 2.0 if they bring back theme support.

The current code for theme support-based color is quite “interesting” and IMVHO should be scrapped. Given that this text is far outside the bounds of that theme stuff it would not get colored anyway. AFAIR, font size is not a part of that themeing but I only looked at it once and that was a long time ago.

I found a tiny bug in the previous patch (a S.StartThreeColumn(); did not have a closing S.EndMultiColumn(); – which does not seem to affect anything but is now fixed).

Also, having been snowbound now for a week and having way too much time on my hands…
sizeColor&Family.png
This might be the final patch on this; it adds font family to the mix (I prefer Roman or teletype to Swiss) as a Preference setting:
[edit: added needed header #includes]

Index: src/prefs/GUIPrefs.cpp
===================================================================
--- src/prefs/GUIPrefs.cpp	(revision 11419)
+++ src/prefs/GUIPrefs.cpp	(working copy)
@@ -20,6 +20,9 @@
 #include "../Audacity.h"
 
 #include <wx/defs.h>
+#include <wx/clrpicker.h>
+#include <wx/textctrl.h>
+#include <wx/msgdlg.h>
 
 #include "../AudacityApp.h"
 #include "../Languages.h"
@@ -31,6 +34,7 @@
 GUIPrefs::GUIPrefs(wxWindow * parent)
 :  PrefsPanel(parent, _("Interface"))
 {
+   fontColorPickerCtrl = NULL;
    Populate();
 }
 
@@ -63,6 +67,22 @@
    mRangeChoices.Add(_("-120 dB (approximate limit of human hearing)"));
    mRangeChoices.Add(_("-145 dB (PCM range of 24 bit samples)"));
 
+   mFontFamilyCodes.Add(wxT("wxFONTFAMILY_DEFAULT"));
+   mFontFamilyCodes.Add(wxT("wxFONTFAMILY_DECORATIVE"));
+   mFontFamilyCodes.Add(wxT("wxFONTFAMILY_ROMAN"));
+   mFontFamilyCodes.Add(wxT("wxFONTFAMILY_SCRIPT"));
+   mFontFamilyCodes.Add(wxT("wxFONTFAMILY_SWISS"));
+   mFontFamilyCodes.Add(wxT("wxFONTFAMILY_MODERN"));
+   mFontFamilyCodes.Add(wxT("wxFONTFAMILY_TELETYPE"));
+
+   mFontFamilyChoices.Add(_("Default"));
+   mFontFamilyChoices.Add(_("Decorative"));
+   mFontFamilyChoices.Add(_("Roman"));
+   mFontFamilyChoices.Add(_("Script"));
+   mFontFamilyChoices.Add(_("Swiss"));
+   mFontFamilyChoices.Add(_("Modern"));
+   mFontFamilyChoices.Add(_("Teletype"));
+
 #if 0
    // only for testing...
    mLangCodes.Add("kg");   mLangNames.Add("Klingon");
@@ -128,6 +148,55 @@
       S.TieCheckBox(_("&Show track name in waveform display"),
                     wxT("/GUI/ShowTrackNameInWaveform"),
                     false);
+      S.StartThreeColumn();
+      {
+         int fontSize = gPrefs->Read(wxT("/GUI/FontSizeForNameInWaveform"), (int)8);
+         mFontSizeCtrl = S.TieNumericTextBox(_("Font size for track name in waveform display"), wxT("/GUI/FontSizeForNameInWaveform"), fontSize, 4);
+         mFontSizeCtrl->SetSizeHints(wxSize(50,20));
+         S.AddUnits(_(" Color: "));
+         wxPoint fontSizeCtrlLocation = mFontSizeCtrl->GetPosition();
+         fontSizeCtrlLocation.x = 320;
+         fontSizeCtrlLocation.y += 200;
+         wxString red;
+         long redValue = 0;
+         if (gPrefs->Read(wxT("/GUI/FontColorRedForNameInWaveform"), &red))
+            red.ToLong(&redValue);
+
+         wxString green;
+         long greenValue = 0;
+         if (gPrefs->Read(wxT("/GUI/FontColorGreenForNameInWaveform"), &green))
+            green.ToLong(&greenValue);
+
+         wxString blue;
+         long blueValue = 0;
+         if (gPrefs->Read(wxT("/GUI/FontColorBlueForNameInWaveform"), &blue))
+            blue.ToLong(&blueValue);
+
+         wxColour fontColor(redValue, greenValue, blueValue);
+         if (!fontColorPickerCtrl)
+            fontColorPickerCtrl = new wxColourPickerCtrl((wxWindow *)this, wxID_ANY, fontColor, fontSizeCtrlLocation);
+         else {
+            wxColour fontColor = fontColorPickerCtrl->GetColour();
+            unsigned char red = fontColor.Red();
+            unsigned char green = fontColor.Green();
+            unsigned char blue = fontColor.Blue();
+            gPrefs->Write(wxT("/GUI/FontColorRedForNameInWaveform"), red);
+            gPrefs->Write(wxT("/GUI/FontColorGreenForNameInWaveform"), green);
+            gPrefs->Write(wxT("/GUI/FontColorBlueForNameInWaveform"), blue);
+         }
+      }
+      S.EndMultiColumn();
+
+      S.StartMultiColumn(2);
+      {
+         S.TieChoice(_("Font family for track name in waveform display"),
+                     wxT("/GUI/FontFamilyForNameInWaveform"),
+                     wxT("Swiss"),
+                     mFontFamilyChoices,
+                     mFontFamilyCodes);
+         S.SetSizeHints(mFontFamilyChoices);
+      }
+      S.EndMultiColumn();
    }
    S.EndStatic();
 
@@ -152,6 +221,17 @@
    ShuttleGui S(this, eIsSavingToPrefs);
    PopulateOrExchange(S);
 
+   //validate user's choice of font size
+   long fontSize = 8;
+   mFontSizeCtrl->GetValue().ToLong(&fontSize);
+   if (fontSize < 8) {
+      fontSize = 8;
+      gPrefs->Write(wxT("/GUI/FontSizeForNameInWaveform"), (int)8);
+      wxMessageBox(_("Font size must be no smaller than 8; setting to 8."));
+   }
+   //else if (fontSize > TOO_BIG) {//how big is too big?
+   if (fontColorPickerCtrl) delete fontColorPickerCtrl;
+
    // If language has changed, we want to change it now, not on the next reboot.
    wxString lang = gPrefs->Read(wxT("/Locale/Language"), wxT(""));
    if (lang == wxT(""))
Index: src/prefs/GUIPrefs.h
===================================================================
--- src/prefs/GUIPrefs.h	(revision 11419)
+++ src/prefs/GUIPrefs.h	(working copy)
@@ -17,6 +17,9 @@
 
 #include <wx/arrstr.h>
 #include <wx/window.h>
+#include <wx/clrpicker.h>
+#include <wx/textctrl.h>
+#include <wx/msgdlg.h>
 
 #include "../ShuttleGui.h"
 
@@ -41,6 +44,11 @@
 
    wxArrayString mRangeCodes;
    wxArrayString mRangeChoices;
+
+   wxArrayString mFontFamilyCodes;
+   wxArrayString mFontFamilyChoices;
+   wxTextCtrl * mFontSizeCtrl;
+   wxColourPickerCtrl * fontColorPickerCtrl;
 };
 
 #endif
Index: src/TrackArtist.cpp
===================================================================
--- src/TrackArtist.cpp	(revision 11419)
+++ src/TrackArtist.cpp	(working copy)
@@ -321,7 +321,28 @@
    dc.DrawRectangle(clip);
 #endif
 
-   wxFont labelFont(8, wxSWISS, wxNORMAL, wxNORMAL);
+   
+   int fontSize = gPrefs->Read(wxT("/GUI/FontSizeForNameInWaveform"), (int)8);
+   wxString fontFamilyStr = gPrefs->Read(wxT("/GUI/FontFamilyForNameInWaveform"), wxT("wxFONTFAMILY_SWISS"));
+   int fontFamily = wxFONTFAMILY_SWISS;
+   if (fontFamilyStr.IsSameAs(wxT("wxFONTFAMILY_DEFAULT")))
+         fontFamily = wxFONTFAMILY_DEFAULT;
+   else if (fontFamilyStr.IsSameAs(wxT("wxFONTFAMILY_DECORATIVE")))
+         fontFamily = wxFONTFAMILY_DECORATIVE;
+   else if (fontFamilyStr.IsSameAs(wxT("wxFONTFAMILY_ROMAN")))
+         fontFamily = wxFONTFAMILY_ROMAN;
+   else if (fontFamilyStr.IsSameAs(wxT("wxFONTFAMILY_SCRIPT")))
+         fontFamily = wxFONTFAMILY_SCRIPT;
+   else if (fontFamilyStr.IsSameAs(wxT("wxFONTFAMILY_SWISS")))
+         fontFamily = wxFONTFAMILY_SWISS;
+   else if (fontFamilyStr.IsSameAs(wxT("wxFONTFAMILY_MODERN")))
+         fontFamily = wxFONTFAMILY_MODERN;
+   else if (fontFamilyStr.IsSameAs(wxT("wxFONTFAMILY_TELETYPE")))
+         fontFamily = wxFONTFAMILY_TELETYPE;
+   else
+         fontFamily = wxFONTFAMILY_SWISS;
+
+   wxFont labelFont(fontSize, fontFamily, wxNORMAL, wxNORMAL);
    dc.SetFont(labelFont);
    gPrefs->Read(wxT("/GUI/ShowTrackNameInWaveform"), &mbShowTrackNameInWaveform, false);
 
@@ -403,8 +424,29 @@
       case WaveTrack::WaveformDisplay:
          DrawWaveform(wt, dc, r, viewInfo,
                       drawEnvelope, drawSamples, drawSliders, false, muted);
-         if (mbShowTrackNameInWaveform && wt->GetChannel() != Track::RightChannel)    // so left or mono only
+
+         if (mbShowTrackNameInWaveform && wt->GetChannel() != Track::RightChannel) {    // so left or mono only
+            const wxColour& originalForegroundTextColor = dc.GetTextForeground();
+            wxString red;
+            long redValue = 0;
+            if (gPrefs->Read(wxT("/GUI/FontColorRedForNameInWaveform"), &red))
+               red.ToLong(&redValue);
+
+            wxString green;
+            long greenValue = 0;
+            if (gPrefs->Read(wxT("/GUI/FontColorGreenForNameInWaveform"), &green))
+               green.ToLong(&greenValue);
+
+            wxString blue;
+            long blueValue = 0;
+            if (gPrefs->Read(wxT("/GUI/FontColorBlueForNameInWaveform"), &blue))
+               blue.ToLong(&blueValue);
+
+            wxColour newForegroundColor(redValue, greenValue, blueValue);
+            dc.SetTextForeground(newForegroundColor);
             dc.DrawText (wt->GetName(), r.x+10, r.y);  // move right 10 pixels to avoid overwriting <- symbol
+            dc.SetTextForeground(originalForegroundTextColor);
+         }
          break;
       case WaveTrack::WaveformDBDisplay:
          DrawWaveform(wt, dc, r, viewInfo,

I applied only the patch in your last post.
I’m not seeing the colour in Preferences (though setting the colour manually in audacity.cfg produces the expected colour in the audio track text.
[Update] I’ve just realised, the colour IS shown in Preferences, but in the wrong place. It’s too high and too far to the left as shown here
colour.png
The font size works well - nice touch :slight_smile:

The font choices seem a bit Mac-centric. Modern and Teletype produce one font, Roman produces a serif font and all of the other options produce the default font. Is there any way to get the font options from the fonts actually installed? If not would generic font families (as used in HTML) work? (for example: serif/sans-serif/cursive/monospace)

I will need a capture of the entire dialog so I may measure the offsets in Linux (and I am guessing those offsets might be different on different Linux installs). If you send me one I will tailor the code with a Windows/Linux fork–very easy to do. For now just look at GUIPrefs.cpp lines 158 & 159:

         fontSizeCtrlLocation.x = 320+89;
         fontSizeCtrlLocation.y += 200+64;

and make those added additions then fudge them as needed for your display.

These are the wxWidgets 2.8 built-in offerings over which I have no control; each are different (except default is Swiss) on Windows; until we drag Bill into the compiling age we will not know about Mac. I could use a wxFontDialog which would give access to all installed fonts (or some approximation thereof??) but since there is no ShuttleGUI version I would have the same problems as I did with the color picker (setting location & transferring/storing data). My drive was plowed this afternoon so I am no longer snowbound but if I get really enthusiastic I might add a font dialog and see what happens.

interface.png

I’ve changed GUIPrefs.cpp lines 158 & 159:

         fontSizeCtrlLocation.x = 425;
         fontSizeCtrlLocation.y += 260;

interface2.png

Change those two lines so they become:

#ifdef __WXMSW__ 
         fontSizeCtrlLocation.x = 320;
         fontSizeCtrlLocation.y += 200;
#endif
#ifdef __WXGTK__
         fontSizeCtrlLocation.x = 425;
         fontSizeCtrlLocation.y += 260;
#endif
#ifdef __WXMAC__
         //don't really know what the correct values are
         fontSizeCtrlLocation.x = 320;
         fontSizeCtrlLocation.y += 200;
#endif

and note that the MAC stuff is still undetermined.

Oh, and, something like:
sfd.png

OK, here is what it looks like:
plf.png
bff.png
The current stumbling block is that I have not figured out how to store a system font in Prefs–mañana. The following patch has all the old patch stuff commented out. Doing it this way is far less code and removes the problem of the color picker’s location; the font dialog is launched via a button for which we have ShuttleGUI access.

Index: src/AudacityApp.h
===================================================================
--- src/AudacityApp.h	(revision 11419)
+++ src/AudacityApp.h	(working copy)
@@ -24,6 +24,7 @@
 #include <wx/snglinst.h>
 #include <wx/log.h>
 #include <wx/timer.h>
+#include <wx/font.h>
 
 #include "widgets/FileHistory.h"
 #include "ondemand/ODTaskThread.h"
@@ -193,6 +194,8 @@
    Importer *mImporter;
 
    wxLogWindow *mLogger;
+   wxFont mWaveformFont;
+   wxColor mWaveformFontColor;
 
 #if defined(__WXGTK__)
    /** brief This flag is set true when in a keyboard event handler.
Index: src/prefs/GUIPrefs.cpp
===================================================================
--- src/prefs/GUIPrefs.cpp	(revision 11419)
+++ src/prefs/GUIPrefs.cpp	(working copy)
@@ -20,6 +20,10 @@
 #include "../Audacity.h"
 
 #include <wx/defs.h>
+#include <wx/clrpicker.h>
+#include <wx/textctrl.h>
+#include <wx/msgdlg.h>
+#include <wx/fontdlg.h>
 
 #include "../AudacityApp.h"
 #include "../Languages.h"
@@ -28,9 +32,16 @@
 
 #include "GUIPrefs.h"
 
+#define ID_FONTDIALOG_BUTTON 7777
+
+BEGIN_EVENT_TABLE(GUIPrefs, PrefsPanel)
+   EVT_BUTTON(ID_FONTDIALOG_BUTTON, GUIPrefs::OnFontDialogButton)
+END_EVENT_TABLE()
+
 GUIPrefs::GUIPrefs(wxWindow * parent)
 :  PrefsPanel(parent, _("Interface"))
 {
+   //mFontColorPickerCtrl = NULL;
    Populate();
 }
 
@@ -63,6 +74,22 @@
    mRangeChoices.Add(_("-120 dB (approximate limit of human hearing)"));
    mRangeChoices.Add(_("-145 dB (PCM range of 24 bit samples)"));
 
+   //mFontFamilyCodes.Add(wxT("wxFONTFAMILY_DEFAULT"));
+   //mFontFamilyCodes.Add(wxT("wxFONTFAMILY_DECORATIVE"));
+   //mFontFamilyCodes.Add(wxT("wxFONTFAMILY_ROMAN"));
+   //mFontFamilyCodes.Add(wxT("wxFONTFAMILY_SCRIPT"));
+   //mFontFamilyCodes.Add(wxT("wxFONTFAMILY_SWISS"));
+   //mFontFamilyCodes.Add(wxT("wxFONTFAMILY_MODERN"));
+   //mFontFamilyCodes.Add(wxT("wxFONTFAMILY_TELETYPE"));
+
+   //mFontFamilyChoices.Add(_("Default"));
+   //mFontFamilyChoices.Add(_("Decorative"));
+   //mFontFamilyChoices.Add(_("Roman"));
+   //mFontFamilyChoices.Add(_("Script"));
+   //mFontFamilyChoices.Add(_("Swiss"));
+   //mFontFamilyChoices.Add(_("Modern"));
+   //mFontFamilyChoices.Add(_("Teletype"));
+
 #if 0
    // only for testing...
    mLangCodes.Add("kg");   mLangNames.Add("Klingon");
@@ -78,6 +105,15 @@
    // ----------------------- End of main section --------------
 }
 
+void GUIPrefs::OnFontDialogButton(wxCommandEvent & e)
+{
+   wxFontDialog fontDialog = new wxFontDialog((wxWindow *)this);
+   fontDialog.ShowModal();
+   wxFontData fontData = fontDialog.GetFontData();
+   wxGetApp().mWaveformFont = fontData.GetChosenFont();
+   wxGetApp().mWaveformFontColor = fontData.GetColour();
+}
+
 void GUIPrefs::PopulateOrExchange(ShuttleGui & S)
 {
    S.SetBorder(2);
@@ -128,6 +164,68 @@
       S.TieCheckBox(_("&Show track name in waveform display"),
                     wxT("/GUI/ShowTrackNameInWaveform"),
                     false);
+//      S.StartThreeColumn();
+//      {
+//         int fontSize = gPrefs->Read(wxT("/GUI/FontSizeForNameInWaveform"), (int)8);
+//         mFontSizeCtrl = S.TieNumericTextBox(_("Font size for track name in waveform display"), wxT("/GUI/FontSizeForNameInWaveform"), fontSize, 4);
+//         mFontSizeCtrl->SetSizeHints(wxSize(50,20));
+//         S.AddUnits(_(" Color: "));
+//         wxPoint fontSizeCtrlLocation = mFontSizeCtrl->GetPosition();
+//#ifdef __WXMSW__ 
+//         fontSizeCtrlLocation.x = 320;
+//         fontSizeCtrlLocation.y += 200;
+//#endif
+//#ifdef __WXGTK__
+//         fontSizeCtrlLocation.x = 425;
+//         fontSizeCtrlLocation.y += 260;
+//#endif
+//#ifdef __WXMAC__
+//         //don't really know what the correct values are
+//         fontSizeCtrlLocation.x = 320;
+//         fontSizeCtrlLocation.y += 200;
+//#endif
+//         wxString red;
+//         long redValue = 0;
+//         if (gPrefs->Read(wxT("/GUI/FontColorRedForNameInWaveform"), &red))
+//            red.ToLong(&redValue);
+//
+//         wxString green;
+//         long greenValue = 0;
+//         if (gPrefs->Read(wxT("/GUI/FontColorGreenForNameInWaveform"), &green))
+//            green.ToLong(&greenValue);
+//
+//         wxString blue;
+//         long blueValue = 0;
+//         if (gPrefs->Read(wxT("/GUI/FontColorBlueForNameInWaveform"), &blue))
+//            blue.ToLong(&blueValue);
+//
+//         wxColour fontColor(redValue, greenValue, blueValue);
+//         if (!mFontColorPickerCtrl)
+//            mFontColorPickerCtrl = new wxColourPickerCtrl((wxWindow *)this, wxID_ANY, fontColor, fontSizeCtrlLocation);
+//         else {
+//            wxColour fontColor = mFontColorPickerCtrl->GetColour();
+//            unsigned char red = fontColor.Red();
+//            unsigned char green = fontColor.Green();
+//            unsigned char blue = fontColor.Blue();
+//            gPrefs->Write(wxT("/GUI/FontColorRedForNameInWaveform"), red);
+//            gPrefs->Write(wxT("/GUI/FontColorGreenForNameInWaveform"), green);
+//            gPrefs->Write(wxT("/GUI/FontColorBlueForNameInWaveform"), blue);
+//         }
+//      }
+//      S.EndMultiColumn();
+//
+//      S.StartMultiColumn(2);
+//      {
+//         S.TieChoice(_("Font family for track name in waveform display"),
+//                     wxT("/GUI/FontFamilyForNameInWaveform"),
+//                     wxT("Swiss"),
+//                     mFontFamilyChoices,
+//                     mFontFamilyCodes);
+//         S.SetSizeHints(mFontFamilyChoices);
+//      }
+//      S.EndMultiColumn();
+
+      S.Id(ID_FONTDIALOG_BUTTON).AddButton(_("System Font Dialog for waveform text..."), wxALL | wxALIGN_LEFT | wxALIGN_CENTRE_VERTICAL);
    }
    S.EndStatic();
 
@@ -152,6 +250,19 @@
    ShuttleGui S(this, eIsSavingToPrefs);
    PopulateOrExchange(S);
 
+   //validate user's choice of font size
+   //if (mFontSizeCtrl) {
+   //   long fontSize = 8;
+   //   mFontSizeCtrl->GetValue().ToLong(&fontSize);
+   //   if (fontSize < 8) {
+   //      fontSize = 8;
+   //      gPrefs->Write(wxT("/GUI/FontSizeForNameInWaveform"), (int)8);
+   //      wxMessageBox(_("Font size must be no smaller than 8; setting to 8."));
+   //   }
+   //   //else if (fontSize > TOO_BIG) {//how big is too big?
+   //}
+   //if (mFontColorPickerCtrl) delete mFontColorPickerCtrl;
+
    // If language has changed, we want to change it now, not on the next reboot.
    wxString lang = gPrefs->Read(wxT("/Locale/Language"), wxT(""));
    if (lang == wxT(""))
Index: src/prefs/GUIPrefs.h
===================================================================
--- src/prefs/GUIPrefs.h	(revision 11419)
+++ src/prefs/GUIPrefs.h	(working copy)
@@ -17,6 +17,10 @@
 
 #include <wx/arrstr.h>
 #include <wx/window.h>
+#include <wx/clrpicker.h>
+#include <wx/textctrl.h>
+#include <wx/msgdlg.h>
+#include <wx/fontdlg.h>
 
 #include "../ShuttleGui.h"
 
@@ -41,6 +45,15 @@
 
    wxArrayString mRangeCodes;
    wxArrayString mRangeChoices;
+
+   //wxArrayString mFontFamilyCodes;
+   //wxArrayString mFontFamilyChoices;
+   //wxTextCtrl * mFontSizeCtrl;
+   //wxColourPickerCtrl * mFontColorPickerCtrl;
+
+   void OnFontDialogButton(wxCommandEvent & e);
+
+   DECLARE_EVENT_TABLE();
 };
 
 #endif
Index: src/TrackArtist.cpp
===================================================================
--- src/TrackArtist.cpp	(revision 11419)
+++ src/TrackArtist.cpp	(working copy)
@@ -321,8 +321,30 @@
    dc.DrawRectangle(clip);
 #endif
 
-   wxFont labelFont(8, wxSWISS, wxNORMAL, wxNORMAL);
-   dc.SetFont(labelFont);
+   
+   //int fontSize = gPrefs->Read(wxT("/GUI/FontSizeForNameInWaveform"), (int)8);
+   //wxString fontFamilyStr = gPrefs->Read(wxT("/GUI/FontFamilyForNameInWaveform"), wxT("wxFONTFAMILY_SWISS"));
+   //int fontFamily = wxFONTFAMILY_SWISS;
+   //if (fontFamilyStr.IsSameAs(wxT("wxFONTFAMILY_DEFAULT")))
+   //      fontFamily = wxFONTFAMILY_DEFAULT;
+   //else if (fontFamilyStr.IsSameAs(wxT("wxFONTFAMILY_DECORATIVE")))
+   //      fontFamily = wxFONTFAMILY_DECORATIVE;
+   //else if (fontFamilyStr.IsSameAs(wxT("wxFONTFAMILY_ROMAN")))
+   //      fontFamily = wxFONTFAMILY_ROMAN;
+   //else if (fontFamilyStr.IsSameAs(wxT("wxFONTFAMILY_SCRIPT")))
+   //      fontFamily = wxFONTFAMILY_SCRIPT;
+   //else if (fontFamilyStr.IsSameAs(wxT("wxFONTFAMILY_SWISS")))
+   //      fontFamily = wxFONTFAMILY_SWISS;
+   //else if (fontFamilyStr.IsSameAs(wxT("wxFONTFAMILY_MODERN")))
+   //      fontFamily = wxFONTFAMILY_MODERN;
+   //else if (fontFamilyStr.IsSameAs(wxT("wxFONTFAMILY_TELETYPE")))
+   //      fontFamily = wxFONTFAMILY_TELETYPE;
+   //else
+   //      fontFamily = wxFONTFAMILY_SWISS;
+
+   //wxFont labelFont(fontSize, fontFamily, wxNORMAL, wxNORMAL);
+   //dc.SetFont(labelFont);
+   dc.SetFont(wxGetApp().mWaveformFont);
    gPrefs->Read(wxT("/GUI/ShowTrackNameInWaveform"), &mbShowTrackNameInWaveform, false);
 
    t = iter.StartWith(start);
@@ -403,8 +425,30 @@
       case WaveTrack::WaveformDisplay:
          DrawWaveform(wt, dc, r, viewInfo,
                       drawEnvelope, drawSamples, drawSliders, false, muted);
-         if (mbShowTrackNameInWaveform && wt->GetChannel() != Track::RightChannel)    // so left or mono only
+
+         if (mbShowTrackNameInWaveform && wt->GetChannel() != Track::RightChannel) {    // so left or mono only
+            const wxColour& originalForegroundTextColor = dc.GetTextForeground();
+            //wxString red;
+            //long redValue = 0;
+            //if (gPrefs->Read(wxT("/GUI/FontColorRedForNameInWaveform"), &red))
+            //   red.ToLong(&redValue);
+
+            //wxString green;
+            //long greenValue = 0;
+            //if (gPrefs->Read(wxT("/GUI/FontColorGreenForNameInWaveform"), &green))
+            //   green.ToLong(&greenValue);
+
+            //wxString blue;
+            //long blueValue = 0;
+            //if (gPrefs->Read(wxT("/GUI/FontColorBlueForNameInWaveform"), &blue))
+            //   blue.ToLong(&blueValue);
+
+            //wxColour newForegroundColor(redValue, greenValue, blueValue);
+            //dc.SetTextForeground(newForegroundColor);
+            dc.SetTextForeground(wxGetApp().mWaveformFontColor);
             dc.DrawText (wt->GetName(), r.x+10, r.y);  // move right 10 pixels to avoid overwriting <- symbol
+            dc.SetTextForeground(originalForegroundTextColor);
+         }
          break;
       case WaveTrack::WaveformDBDisplay:
          DrawWaveform(wt, dc, r, viewInfo,

OK Steve, you wanted native fonts so here it is with the choice preserved in Pref’s config file. If you ran previous patches there will be some extraneous data in config but it is harmless. The color stuff remains the same and there is a new string which IDs the native font details. Only tested on Win7.

This is a very small patch which I think is ready for QA and an FR proposal. On such a proposal, I might argue for adding my original “size” field back in so that one could only change the size of the default wxFONTFAMILY_SWISS–if no font descriptor was found in Pref’s config file Audacity would use the selected (and stored) size with the default font.

Index: src/prefs/GUIPrefs.cpp
===================================================================
--- src/prefs/GUIPrefs.cpp	(revision 11430)
+++ src/prefs/GUIPrefs.cpp	(working copy)
@@ -20,6 +20,7 @@
 #include "../Audacity.h"
 
 #include <wx/defs.h>
+#include <wx/fontdlg.h>
 
 #include "../AudacityApp.h"
 #include "../Languages.h"
@@ -28,6 +29,12 @@
 
 #include "GUIPrefs.h"
 
+#define ID_FONTDIALOG_BUTTON 7777
+
+BEGIN_EVENT_TABLE(GUIPrefs, PrefsPanel)
+   EVT_BUTTON(ID_FONTDIALOG_BUTTON, GUIPrefs::OnFontDialogButton)
+END_EVENT_TABLE()
+
 GUIPrefs::GUIPrefs(wxWindow * parent)
 :  PrefsPanel(parent, _("Interface"))
 {
@@ -78,6 +85,21 @@
    // ----------------------- End of main section --------------
 }
 
+void GUIPrefs::OnFontDialogButton(wxCommandEvent & e)
+{
+   wxFontDialog fontDialog = new wxFontDialog((wxWindow *)this);
+   fontDialog.ShowModal();
+   wxFontData fontData = fontDialog.GetFontData();
+   gPrefs->Write(wxT("/GUI/NativeFontForNameInWaveform"), fontData.GetChosenFont().GetNativeFontInfoDesc());
+   const wxColor fontColor = fontData.GetColour();
+   unsigned char red = fontColor.Red();
+   unsigned char green = fontColor.Green();
+   unsigned char blue = fontColor.Blue();
+   gPrefs->Write(wxT("/GUI/FontColorRedForNameInWaveform"), red);
+   gPrefs->Write(wxT("/GUI/FontColorGreenForNameInWaveform"), green);
+   gPrefs->Write(wxT("/GUI/FontColorBlueForNameInWaveform"), blue);
+}
+
 void GUIPrefs::PopulateOrExchange(ShuttleGui & S)
 {
    S.SetBorder(2);
@@ -128,6 +150,8 @@
       S.TieCheckBox(_("&Show track name in waveform display"),
                     wxT("/GUI/ShowTrackNameInWaveform"),
                     false);
+      S.Id(ID_FONTDIALOG_BUTTON).AddButton(_("System Font Dialog for waveform text..."), 
+                                           wxALL | wxALIGN_LEFT | wxALIGN_CENTRE_VERTICAL);
    }
    S.EndStatic();
 
Index: src/prefs/GUIPrefs.h
===================================================================
--- src/prefs/GUIPrefs.h	(revision 11430)
+++ src/prefs/GUIPrefs.h	(working copy)
@@ -17,6 +17,8 @@
 
 #include <wx/arrstr.h>
 #include <wx/window.h>
+#include <wx/clrpicker.h>
+#include <wx/textctrl.h>
 
 #include "../ShuttleGui.h"
 
@@ -41,6 +43,10 @@
 
    wxArrayString mRangeCodes;
    wxArrayString mRangeChoices;
+
+   void OnFontDialogButton(wxCommandEvent & e);
+
+   DECLARE_EVENT_TABLE();
 };
 
 #endif
Index: src/TrackArtist.cpp
===================================================================
--- src/TrackArtist.cpp	(revision 11430)
+++ src/TrackArtist.cpp	(working copy)
@@ -160,6 +160,7 @@
 #include <wx/pen.h>
 #include <wx/log.h>
 #include <wx/datetime.h>
+//#include <wx/string.h>
 
 #ifdef USE_MIDI
 #include "NoteTrack.h"
@@ -321,7 +322,10 @@
    dc.DrawRectangle(clip);
 #endif
 
-   wxFont labelFont(8, wxSWISS, wxNORMAL, wxNORMAL);
+   wxFont labelFont(8, wxFONTFAMILY_SWISS, wxNORMAL, wxNORMAL);
+   wxString fontDescription = gPrefs->Read(wxT("/GUI/NativeFontForNameInWaveform"), wxEmptyString);
+   if (!fontDescription.IsEmpty())
+      labelFont.SetNativeFontInfo(fontDescription);
    dc.SetFont(labelFont);
    gPrefs->Read(wxT("/GUI/ShowTrackNameInWaveform"), &mbShowTrackNameInWaveform, false);
 
@@ -403,8 +407,29 @@
       case WaveTrack::WaveformDisplay:
          DrawWaveform(wt, dc, r, viewInfo,
                       drawEnvelope, drawSamples, drawSliders, false, muted);
-         if (mbShowTrackNameInWaveform && wt->GetChannel() != Track::RightChannel)    // so left or mono only
+
+         if (mbShowTrackNameInWaveform && wt->GetChannel() != Track::RightChannel) {    // so left or mono only
+            const wxColour& originalForegroundTextColor = dc.GetTextForeground();
+            wxString red;
+            long redValue = 0;
+            if (gPrefs->Read(wxT("/GUI/FontColorRedForNameInWaveform"), &red))
+               red.ToLong(&redValue);
+
+            wxString green;
+            long greenValue = 0;
+            if (gPrefs->Read(wxT("/GUI/FontColorGreenForNameInWaveform"), &green))
+               green.ToLong(&greenValue);
+
+            wxString blue;
+            long blueValue = 0;
+            if (gPrefs->Read(wxT("/GUI/FontColorBlueForNameInWaveform"), &blue))
+               blue.ToLong(&blueValue);
+
+            wxColour newForegroundColor(redValue, greenValue, blueValue);
+            dc.SetTextForeground(newForegroundColor);
             dc.DrawText (wt->GetName(), r.x+10, r.y);  // move right 10 pixels to avoid overwriting <- symbol
+            dc.SetTextForeground(originalForegroundTextColor);
+         }
          break;
       case WaveTrack::WaveformDBDisplay:
          DrawWaveform(wt, dc, r, viewInfo,

I tried applying your latest patch to a brand new svn checkout. Unfortunately I’m getting an error during “make”:

/usr/include/wx-2.8/wx/fontdlg.h: In copy constructor ‘wxFontDialog::wxFontDialog(const wxFontDialog&)’:
/usr/include/wx-2.8/wx/fontdlg.h:61: error: ‘wxFontDialogBase::wxFontDialogBase(const wxFontDialogBase&)’ is private
/usr/include/wx-2.8/wx/gtk/fontdlg.h:19: error: within this context
prefs/GUIPrefs.cpp: In member function ‘void GUIPrefs::OnFontDialogButton(wxCommandEvent&)’:
prefs/GUIPrefs.cpp:90: note: synthesized method ‘wxFontDialog::wxFontDialog(const wxFontDialog&)’ first required here 
make[1]: *** [prefs/GUIPrefs.o] Error 1
make[1]: Leaving directory `/home/steve/sourcecode/audacity/src'
make: *** [audacity] Error 2

I did notice a warning when applying the patch:

patching file src/TrackArtist.cpp
patch unexpectedly ends in middle of line
Hunk #3 succeeded at 407 with fuzz 1.

Let me send you a patch via e-mail since we may not attach .patch files here.

You will need to delete the three files (trackartist.cpp, guiprefs.h & guiprefs.cpp) from your ccurrent SVN and do an Update before running the patch.

I got some help on this from the wxWidgets Forum and just now got a suggestion for simplifying the color storage stuff so will test and implement that for the new patch.

You can attach patch files that have the file extension .patch
(we added that a while back, I think in response to your previous complaint :slight_smile: )