diff --git a/src/HelpText.cpp b/src/HelpText.cpp index 5685fcd54..c26c9f44d 100644 --- a/src/HelpText.cpp +++ b/src/HelpText.cpp @@ -18,15 +18,21 @@ #include "Audacity.h" #include "HelpText.h" #include "FileNames.h" +#include "AllThemeResources.h" +wxString HtmlColourOfIndex( int i ){ + wxColour c = theTheme.Colour(i); + return wxString::Format("\"#%02X%02X%02X\"", + c.Red(), c.Green(), c.Blue() ); +} static wxString WrapText( const wxString & Text ) { return wxString(wxT(""))+ wxT("") + - wxT("") + - wxT("")+ + wxT("") + + wxT("") + wxT("

") + Text + wxT("")+ wxT(""); @@ -91,7 +97,7 @@ static wxString LinkExpand( const wxString & Text ) Key = Key.Mid( 0, j ); LinkText = LinkText.Mid( 0, k ); - LinkText=""+LinkText+""; + LinkText=wxString("") +LinkText+""; wxString Replacement; if( Key.StartsWith( wxT("wiki:") )) { diff --git a/src/toolbars/SelectionBar.cpp b/src/toolbars/SelectionBar.cpp index 7597cd185..1df5c518e 100644 --- a/src/toolbars/SelectionBar.cpp +++ b/src/toolbars/SelectionBar.cpp @@ -52,6 +52,7 @@ with changes in the SelectionBar. #include "../Project.h" #include "../Snap.h" #include "../widgets/NumericTextCtrl.h" +#include "../AllThemeResources.h" IMPLEMENT_CLASS(SelectionBar, ToolBar); @@ -136,7 +137,7 @@ void SelectionBar::Populate() // Top row (mostly labels) // - wxColour clrText = *wxWHITE; + wxColour clrText = theTheme.Colour( clrTrackPanelText ); wxColour clrText2 = *wxBLUE; wxStaticText * pProjRate = safenew wxStaticText(this, -1, _("Project Rate (Hz):"), // LLL: On my Ubuntu 7.04 install, the label wraps to two lines diff --git a/src/widgets/Meter.cpp b/src/widgets/Meter.cpp index 58d0f724e..3e797a519 100644 --- a/src/widgets/Meter.cpp +++ b/src/widgets/Meter.cpp @@ -430,6 +430,8 @@ void Meter::OnPaint(wxPaintEvent & WXUNUSED(event)) std::unique_ptr paintDC{ wxAutoBufferedPaintDCFactory(this) }; #endif wxDC & destDC = *paintDC; + wxColour clrText = theTheme.Colour( clrTrackPanelText ); + wxColour clrBoxFill = theTheme.Colour( clrMedium ); if (mLayoutValid == false) { @@ -471,7 +473,6 @@ void Meter::OnPaint(wxPaintEvent & WXUNUSED(event)) } dc.DrawBitmap(*mIcon, mIconRect.GetPosition(), true); dc.SetFont(GetFont()); - wxColour clrText = *wxWHITE; dc.SetTextForeground( clrText ); dc.DrawText(mLeftText, mLeftTextPos.x, mLeftTextPos.y); dc.DrawText(mRightText, mRightTextPos.x, mRightTextPos.y); @@ -573,7 +574,6 @@ void Meter::OnPaint(wxPaintEvent & WXUNUSED(event)) #endif } } - wxColour clrText = *wxWHITE; mRuler.SetTickColour( clrText ); dc.SetTextForeground( clrText ); // Draw the ruler @@ -592,7 +592,6 @@ void Meter::OnPaint(wxPaintEvent & WXUNUSED(event)) DrawMeterBar(destDC, &mBar[i]); } - wxColour clrText = *wxWHITE; destDC.SetTextForeground( clrText ); #if 0 @@ -631,7 +630,7 @@ void Meter::OnPaint(wxPaintEvent & WXUNUSED(event)) Siz.GetHeight(), Siz.GetWidth() ); - destDC.SetBrush( *wxGREY_BRUSH ); + destDC.SetBrush( wxBrush( clrBoxFill ) ); destDC.SetPen( *wxWHITE_PEN ); destDC.DrawRectangle( r ); destDC.SetBackgroundMode( wxTRANSPARENT ); @@ -650,7 +649,7 @@ void Meter::OnPaint(wxPaintEvent & WXUNUSED(event)) Siz.GetWidth(), Siz.GetHeight() ); - destDC.SetBrush( *wxGREY_BRUSH ); + destDC.SetBrush( wxBrush( clrBoxFill ) ); destDC.SetPen( *wxWHITE_PEN ); destDC.DrawRectangle( r ); destDC.SetBackgroundMode( wxTRANSPARENT );