mirror of
https://github.com/cookiengineer/audacity
synced 2026-01-13 16:15:48 +01:00
Fix deprecation warnings with wxFont, wxPen, wxBrush ctors...
... Replace some enum constants with the equivalent values from the more special-purpose enums, as the wx header files recommend, so overloading selects the ctors with non-int arguments. In a full rebuild of the debug project on Mac, this reduces the count of warnings from 264 to 274.
This commit is contained in:
@@ -701,7 +701,7 @@ void EffectAutoDuckPanel::OnPaint(wxPaintEvent & WXUNUSED(evt))
|
||||
{
|
||||
// draw preview
|
||||
dc.SetBrush(*wxTRANSPARENT_BRUSH);
|
||||
dc.SetPen(wxPen(theTheme.Colour(clrGraphLines), 3, wxSOLID));
|
||||
dc.SetPen(wxPen(theTheme.Colour(clrGraphLines), 3, wxPENSTYLE_SOLID));
|
||||
|
||||
wxPoint points[6];
|
||||
|
||||
@@ -727,7 +727,7 @@ void EffectAutoDuckPanel::OnPaint(wxPaintEvent & WXUNUSED(evt))
|
||||
|
||||
dc.DrawLines(6, points);
|
||||
|
||||
dc.SetPen(wxPen(*wxBLACK, 1, wxDOT));
|
||||
dc.SetPen(wxPen(*wxBLACK, 1, wxPENSTYLE_DOT));
|
||||
|
||||
AColor::Line(dc, FADE_DOWN_START, 10, FADE_DOWN_START, clientHeight - 10);
|
||||
AColor::Line(dc, FADE_UP_START, 10, FADE_UP_START, clientHeight - 10);
|
||||
|
||||
@@ -2937,7 +2937,7 @@ void EqualizationPanel::OnPaint(wxPaintEvent & WXUNUSED(event))
|
||||
mEnvRect.Deflate(PANELBORDER, PANELBORDER);
|
||||
|
||||
// Pure blue x-axis line
|
||||
memDC.SetPen(wxPen(theTheme.Colour( clrGraphLines ), 1, wxSOLID));
|
||||
memDC.SetPen(wxPen(theTheme.Colour( clrGraphLines ), 1, wxPENSTYLE_SOLID));
|
||||
int center = (int) (mEnvRect.height * mEffect->mdBMax/(mEffect->mdBMax-mEffect->mdBMin) + .5);
|
||||
AColor::Line(memDC,
|
||||
mEnvRect.GetLeft(), mEnvRect.y + center,
|
||||
@@ -2951,7 +2951,7 @@ void EqualizationPanel::OnPaint(wxPaintEvent & WXUNUSED(event))
|
||||
}
|
||||
|
||||
// Med-blue envelope line
|
||||
memDC.SetPen(wxPen(theTheme.Colour(clrGraphLines), 3, wxSOLID));
|
||||
memDC.SetPen(wxPen(theTheme.Colour(clrGraphLines), 3, wxPENSTYLE_SOLID));
|
||||
|
||||
// Draw envelope
|
||||
int x, y, xlast = 0, ylast = 0;
|
||||
@@ -2986,7 +2986,7 @@ void EqualizationPanel::OnPaint(wxPaintEvent & WXUNUSED(event))
|
||||
|
||||
//Now draw the actual response that you will get.
|
||||
//mFilterFunc has a linear scale, window has a log one so we have to fiddle about
|
||||
memDC.SetPen(wxPen(theTheme.Colour( clrResponseLines ), 1, wxSOLID));
|
||||
memDC.SetPen(wxPen(theTheme.Colour( clrResponseLines ), 1, wxPENSTYLE_SOLID));
|
||||
double scale = (double)mEnvRect.height/(mEffect->mdBMax-mEffect->mdBMin); //pixels per dB
|
||||
double yF; //gain at this freq
|
||||
double delta = mEffect->mHiFreq / (((double)mEffect->mWindowSize / 2.)); //size of each freq bin
|
||||
|
||||
@@ -1108,7 +1108,7 @@ void EffectScienFilterPanel::OnPaint(wxPaintEvent & WXUNUSED(evt))
|
||||
mEnvRect.Deflate(2, 2);
|
||||
|
||||
// Pure blue x-axis line
|
||||
memDC.SetPen(wxPen(theTheme.Colour(clrGraphLines), 1, wxSOLID));
|
||||
memDC.SetPen(wxPen(theTheme.Colour(clrGraphLines), 1, wxPENSTYLE_SOLID));
|
||||
int center = (int) (mEnvRect.height * mDbMax / (mDbMax - mDbMin) + 0.5);
|
||||
AColor::Line(memDC,
|
||||
mEnvRect.GetLeft(), mEnvRect.y + center,
|
||||
@@ -1116,7 +1116,7 @@ void EffectScienFilterPanel::OnPaint(wxPaintEvent & WXUNUSED(evt))
|
||||
|
||||
//Now draw the actual response that you will get.
|
||||
//mFilterFunc has a linear scale, window has a log one so we have to fiddle about
|
||||
memDC.SetPen(wxPen(theTheme.Colour(clrResponseLines), 3, wxSOLID));
|
||||
memDC.SetPen(wxPen(theTheme.Colour(clrResponseLines), 3, wxPENSTYLE_SOLID));
|
||||
double scale = (double) mEnvRect.height / (mDbMax - mDbMin); // pixels per dB
|
||||
double yF; // gain at this freq
|
||||
|
||||
|
||||
Reference in New Issue
Block a user