diff --git a/src/AColor.cpp b/src/AColor.cpp index eecc39c3b..ef5f5c566 100644 --- a/src/AColor.cpp +++ b/src/AColor.cpp @@ -571,12 +571,12 @@ void AColor::MIDIChannel(wxDC * dc, int channel /* 1 - 16 */ ) const int *colors = AColor_midicolors[channel - 1]; dc->SetPen(wxPen(wxColour(colors[0], - colors[1], colors[2]), 1, wxSOLID)); + colors[1], colors[2]), 1, wxPENSTYLE_SOLID)); dc->SetBrush(wxBrush(wxColour(colors[0], - colors[1], colors[2]), wxSOLID)); + colors[1], colors[2]), wxBRUSHSTYLE_SOLID)); } else { - dc->SetPen(wxPen(wxColour(153, 153, 153), 1, wxSOLID)); - dc->SetBrush(wxBrush(wxColour(153, 153, 153), wxSOLID)); + dc->SetPen(wxPen(wxColour(153, 153, 153), 1, wxPENSTYLE_SOLID)); + dc->SetBrush(wxBrush(wxColour(153, 153, 153), wxBRUSHSTYLE_SOLID)); } } @@ -588,13 +588,13 @@ void AColor::LightMIDIChannel(wxDC * dc, int channel /* 1 - 16 */ ) dc->SetPen(wxPen(wxColour(127 + colors[0] / 2, 127 + colors[1] / 2, - 127 + colors[2] / 2), 1, wxSOLID)); + 127 + colors[2] / 2), 1, wxPENSTYLE_SOLID)); dc->SetBrush(wxBrush(wxColour(127 + colors[0] / 2, 127 + colors[1] / 2, - 127 + colors[2] / 2), wxSOLID)); + 127 + colors[2] / 2), wxBRUSHSTYLE_SOLID)); } else { - dc->SetPen(wxPen(wxColour(204, 204, 204), 1, wxSOLID)); - dc->SetBrush(wxBrush(wxColour(204, 204, 204), wxSOLID)); + dc->SetPen(wxPen(wxColour(204, 204, 204), 1, wxPENSTYLE_SOLID)); + dc->SetBrush(wxBrush(wxColour(204, 204, 204), wxBRUSHSTYLE_SOLID)); } } @@ -606,13 +606,13 @@ void AColor::DarkMIDIChannel(wxDC * dc, int channel /* 1 - 16 */ ) dc->SetPen(wxPen(wxColour(colors[0] / 2, colors[1] / 2, - colors[2] / 2), 1, wxSOLID)); + colors[2] / 2), 1, wxPENSTYLE_SOLID)); dc->SetBrush(wxBrush(wxColour(colors[0] / 2, colors[1] / 2, - colors[2] / 2), wxSOLID)); + colors[2] / 2), wxBRUSHSTYLE_SOLID)); } else { - dc->SetPen(wxPen(wxColour(102, 102, 102), 1, wxSOLID)); - dc->SetBrush(wxBrush(wxColour(102, 102, 102), wxSOLID)); + dc->SetPen(wxPen(wxColour(102, 102, 102), 1, wxPENSTYLE_SOLID)); + dc->SetBrush(wxBrush(wxColour(102, 102, 102), wxBRUSHSTYLE_SOLID)); } } diff --git a/src/FreqWindow.cpp b/src/FreqWindow.cpp index cb222e957..504f41c94 100644 --- a/src/FreqWindow.cpp +++ b/src/FreqWindow.cpp @@ -764,9 +764,9 @@ void FreqWindow::DrawPlot() // Draw the plot if (mAlg == SpectrumAnalyst::Spectrum) - memDC.SetPen(wxPen(theTheme.Colour( clrHzPlot ), 1, wxSOLID)); + memDC.SetPen(wxPen(theTheme.Colour( clrHzPlot ), 1, wxPENSTYLE_SOLID)); else - memDC.SetPen(wxPen(theTheme.Colour( clrWavelengthPlot), 1, wxSOLID)); + memDC.SetPen(wxPen(theTheme.Colour( clrWavelengthPlot), 1, wxPENSTYLE_SOLID)); float xPos = xMin; @@ -923,7 +923,7 @@ void FreqWindow::PlotPaint(wxPaintEvent & event) else px = (int)((bestpeak - xMin) * width / (xMax - xMin)); - dc.SetPen(wxPen(wxColour(160,160,160), 1, wxSOLID)); + dc.SetPen(wxPen(wxColour(160,160,160), 1, wxPENSTYLE_SOLID)); AColor::Line(dc, r.x + 1 + px, r.y, r.x + 1 + px, r.y + r.height); // print out info about the cursor location diff --git a/src/Lyrics.cpp b/src/Lyrics.cpp index bc44395bd..10327e93f 100644 --- a/src/Lyrics.cpp +++ b/src/Lyrics.cpp @@ -582,7 +582,7 @@ void LyricsPanel::HandlePaint_BouncingBall(wxDC &dc) if (mT >= 0.0) { wxRect ball(ctr - ballRadius, yi - ballRadius, 2 * ballRadius, 2 * ballRadius); - dc.SetBrush(wxBrush(wxColour(238, 0, 102), wxSOLID)); + dc.SetBrush(wxBrush(wxColour(238, 0, 102), wxBRUSHSTYLE_SOLID)); dc.DrawEllipse(ball); } } diff --git a/src/MixerBoard.cpp b/src/MixerBoard.cpp index b0b788d1d..8b4552236 100644 --- a/src/MixerBoard.cpp +++ b/src/MixerBoard.cpp @@ -1328,7 +1328,7 @@ void MixerBoard::MakeButtonBitmap( wxMemoryDC & dc, wxBitmap & WXUNUSED(bitmap), #ifdef __WXMSW__ fontSize = 8; #endif - wxFont font(fontSize, wxSWISS, wxNORMAL, wxNORMAL); + wxFont font(fontSize, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL); GetTextExtent(str, &textWidth, &textHeight, NULL, NULL, &font); AColor::UseThemeColour( &dc, clrMedium ); diff --git a/src/Theme.cpp b/src/Theme.cpp index 1e4c1e21e..d29f82f70 100644 --- a/src/Theme.cpp +++ b/src/Theme.cpp @@ -1312,7 +1312,7 @@ auStaticText::auStaticText(wxWindow* parent, wxString textIn) : #ifdef __WXMSW__ fontSize = 9; #endif - wxFont font(fontSize, wxDEFAULT, wxNORMAL, wxNORMAL); + wxFont font(fontSize, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL); GetTextExtent(textIn, &textWidth, &textHeight, NULL, NULL, &font); SetFont( font ); diff --git a/src/TrackArtist.cpp b/src/TrackArtist.cpp index 2e980f288..cf132b766 100644 --- a/src/TrackArtist.cpp +++ b/src/TrackArtist.cpp @@ -492,7 +492,7 @@ void TrackArtist::DrawTrack(TrackPanelDrawingContext &context, !wt->GetName().IsEmpty()) { wxBrush Brush; wxCoord x,y; - wxFont labelFont(12, wxSWISS, wxNORMAL, wxNORMAL); + wxFont labelFont(12, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL); dc.SetFont(labelFont); dc.GetTextExtent( wt->GetName(), &x, &y ); dc.SetTextForeground(theTheme.Colour( clrTrackPanelText )); @@ -624,7 +624,7 @@ void TrackArtist::DrawVRuler fontSize = 8; #endif - wxFont labelFont(fontSize, wxSWISS, wxNORMAL, wxNORMAL); + wxFont labelFont(fontSize, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL); dc->SetFont(labelFont); int octave = 0; @@ -3115,7 +3115,7 @@ void TrackArtist::DrawNoteTrack(const NoteTrack *track, dc.SetPen(wxPen(wxColour(RED(linecolor), GREEN(linecolor), BLUE(linecolor)), - linethick, wxSOLID)); + linethick, wxPENSTYLE_SOLID)); } if (shape != line) { fillcolor = LookupIntAttribute(note, fillcolori, -1); @@ -3125,7 +3125,7 @@ void TrackArtist::DrawNoteTrack(const NoteTrack *track, dc.SetBrush(wxBrush(wxColour(RED(fillcolor), GREEN(fillcolor), BLUE(fillcolor)), - wxSOLID)); + wxBRUSHSTYLE_SOLID)); if (!fillflag) dc.SetBrush(*wxTRANSPARENT_BRUSH); } int y1 = track->PitchToY(LookupRealAttribute(note, y1r, note->pitch)); @@ -3216,11 +3216,11 @@ void TrackArtist::DrawNoteTrack(const NoteTrack *track, int size = LookupIntAttribute(note, sizei, 8); const char *justify = LookupStringAttribute(note, justifys, "ld"); wxFont wxfont; - wxfont.SetFamily(font == roman ? wxROMAN : - (font == swiss ? wxSWISS : - (font == modern ? wxMODERN : wxDEFAULT))); - wxfont.SetStyle(wxNORMAL); - wxfont.SetWeight(weight == bold ? wxBOLD : wxNORMAL); + wxfont.SetFamily(font == roman ? wxFONTFAMILY_ROMAN : + (font == swiss ? wxFONTFAMILY_SWISS : + (font == modern ? wxFONTFAMILY_MODERN : wxFONTFAMILY_DEFAULT))); + wxfont.SetStyle(wxFONTSTYLE_NORMAL); + wxfont.SetWeight(weight == bold ? wxFONTWEIGHT_BOLD : wxFONTWEIGHT_NORMAL); wxfont.SetPointSize(size); dc.SetFont(wxfont); @@ -3246,7 +3246,7 @@ void TrackArtist::DrawNoteTrack(const NoteTrack *track, dc.SetPen(wxPen(wxColour(RED(fillcolor), GREEN(fillcolor), BLUE(fillcolor)), - 1, wxSOLID)); + 1, wxPENSTYLE_SOLID)); dc.DrawRectangle(TIME_TO_X(xx) + hoffset, yy + voffset, textWidth, textHeight); } diff --git a/src/commands/ScreenshotCommand.cpp b/src/commands/ScreenshotCommand.cpp index 7b92e53e3..7fbaf8e29 100644 --- a/src/commands/ScreenshotCommand.cpp +++ b/src/commands/ScreenshotCommand.cpp @@ -260,7 +260,7 @@ bool ScreenshotCommand::Capture( wxBitmap back(width + b.width, height + b.height); fullDC.SelectObject(back); - fullDC.SetBackground(wxBrush(mBackColor, wxSOLID)); + fullDC.SetBackground(wxBrush(mBackColor, wxBRUSHSTYLE_SOLID)); fullDC.Clear(); fullDC.DrawBitmap(part, b.x, b.y); diff --git a/src/effects/AutoDuck.cpp b/src/effects/AutoDuck.cpp index 1ed7f6437..3be7552a9 100644 --- a/src/effects/AutoDuck.cpp +++ b/src/effects/AutoDuck.cpp @@ -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); diff --git a/src/effects/Equalization.cpp b/src/effects/Equalization.cpp index b993825af..12565844c 100644 --- a/src/effects/Equalization.cpp +++ b/src/effects/Equalization.cpp @@ -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 diff --git a/src/effects/ScienFilter.cpp b/src/effects/ScienFilter.cpp index 094d555d3..bb05ffda5 100644 --- a/src/effects/ScienFilter.cpp +++ b/src/effects/ScienFilter.cpp @@ -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 diff --git a/src/export/Export.cpp b/src/export/Export.cpp index 8faaa43cf..338e1d479 100644 --- a/src/export/Export.cpp +++ b/src/export/Export.cpp @@ -1072,7 +1072,7 @@ void ExportMixerPanel::OnPaint(wxPaintEvent & WXUNUSED(event)) } wxColour bkgnd = GetBackgroundColour(); - wxBrush bkgndBrush( bkgnd, wxSOLID ); + wxBrush bkgndBrush( bkgnd, wxBRUSHSTYLE_SOLID ); wxMemoryDC memDC; memDC.SelectObject( *mBitmap ); diff --git a/src/tracks/ui/Scrubbing.cpp b/src/tracks/ui/Scrubbing.cpp index 3312cc30f..e787e1ac1 100644 --- a/src/tracks/ui/Scrubbing.cpp +++ b/src/tracks/ui/Scrubbing.cpp @@ -858,7 +858,7 @@ void ScrubbingOverlay::Draw(OverlayPanel &, wxDC &dc) if (!scrubber.ShouldDrawScrubSpeed()) return; - static const wxFont labelFont(24, wxSWISS, wxNORMAL, wxNORMAL); + static const wxFont labelFont(24, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL); dc.SetFont(labelFont); // These two colors were previously saturated red and green. However @@ -940,7 +940,7 @@ void ScrubbingOverlay::OnTimer(wxCommandEvent &event) wxCoord width, height; { wxClientDC dc(trackPanel); - static const wxFont labelFont(24, wxSWISS, wxNORMAL, wxNORMAL); + static const wxFont labelFont(24, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL); dc.SetFont(labelFont); dc.GetTextExtent(mNextScrubSpeedText, &width, &height); } diff --git a/src/widgets/ASlider.cpp b/src/widgets/ASlider.cpp index 64f1cbe0f..d6866afbb 100644 --- a/src/widgets/ASlider.cpp +++ b/src/widgets/ASlider.cpp @@ -116,7 +116,7 @@ TipPanel::TipPanel(wxWindow *parent, const wxArrayString & labels) { SetBackgroundStyle(wxBG_STYLE_PAINT); - wxFont labelFont(sliderFontSize, wxSWISS, wxNORMAL, wxNORMAL); + wxFont labelFont(sliderFontSize, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL); mWidth = mHeight = 0; for ( const auto &label : labels ) { int width, height; @@ -158,7 +158,7 @@ void TipPanel::OnPaint(wxPaintEvent & WXUNUSED(event)) dc.SetBrush(AColor::tooltipBrush); dc.DrawRoundedRectangle(0, 0, mWidth, mHeight, 5); - dc.SetFont(wxFont(sliderFontSize, wxSWISS, wxNORMAL, wxNORMAL)); + dc.SetFont(wxFont(sliderFontSize, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); dc.SetTextForeground(AColor::tooltipPen.GetColour()); int textWidth, textHeight; @@ -666,7 +666,7 @@ void LWSlider::DrawToBitmap(wxDC & paintDC) // sliderFontSize is for the tooltip. // we need something smaller here... int fontSize = 7; - wxFont labelFont(fontSize, wxSWISS, wxNORMAL, wxNORMAL); + wxFont labelFont(fontSize, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL); dc.SetFont(labelFont); // Colors diff --git a/src/widgets/Meter.cpp b/src/widgets/Meter.cpp index 3069daf75..9283c69a5 100644 --- a/src/widgets/Meter.cpp +++ b/src/widgets/Meter.cpp @@ -264,11 +264,11 @@ MeterPanel::MeterPanel(AudacityProject *project, UpdatePrefs(); wxColour backgroundColour = theTheme.Colour( clrMedium); - mBkgndBrush = wxBrush(backgroundColour, wxSOLID); + mBkgndBrush = wxBrush(backgroundColour, wxBRUSHSTYLE_SOLID); SetBackgroundColour( backgroundColour ); - mPeakPeakPen = wxPen(theTheme.Colour( clrMeterPeak), 1, wxSOLID); - mDisabledPen = wxPen(theTheme.Colour( clrMeterDisabledPen), 1, wxSOLID); + mPeakPeakPen = wxPen(theTheme.Colour( clrMeterPeak), 1, wxPENSTYLE_SOLID); + mDisabledPen = wxPen(theTheme.Colour( clrMeterDisabledPen), 1, wxPENSTYLE_SOLID); // Register for our preference update event wxTheApp->Bind(EVT_METER_PREFERENCES_CHANGED, @@ -283,10 +283,10 @@ MeterPanel::MeterPanel(AudacityProject *project, &MeterPanel::OnAudioIOStatus, this); - mPen = wxPen( theTheme.Colour( clrMeterInputPen ), 1, wxSOLID); - mBrush = wxBrush( theTheme.Colour( clrMeterInputBrush ), wxSOLID); - mRMSBrush = wxBrush( theTheme.Colour( clrMeterInputRMSBrush ), wxSOLID); - mClipBrush = wxBrush( theTheme.Colour( clrMeterInputClipBrush ), wxSOLID); + mPen = wxPen( theTheme.Colour( clrMeterInputPen ), 1, wxPENSTYLE_SOLID); + mBrush = wxBrush( theTheme.Colour( clrMeterInputBrush ), wxBRUSHSTYLE_SOLID); + mRMSBrush = wxBrush( theTheme.Colour( clrMeterInputRMSBrush ), wxBRUSHSTYLE_SOLID); + mClipBrush = wxBrush( theTheme.Colour( clrMeterInputClipBrush ), wxBRUSHSTYLE_SOLID); // mLightPen = wxPen( theTheme.Colour( clrMeterInputLightPen ), 1, wxSOLID); // mDarkPen = wxPen( theTheme.Colour( clrMeterInputDarkPen ), 1, wxSOLID); } @@ -296,10 +296,10 @@ MeterPanel::MeterPanel(AudacityProject *project, &MeterPanel::OnAudioIOStatus, this); - mPen = wxPen( theTheme.Colour( clrMeterOutputPen ), 1, wxSOLID); - mBrush = wxBrush( theTheme.Colour( clrMeterOutputBrush ), wxSOLID); - mRMSBrush = wxBrush( theTheme.Colour( clrMeterOutputRMSBrush ), wxSOLID); - mClipBrush = wxBrush( theTheme.Colour( clrMeterOutputClipBrush ), wxSOLID); + mPen = wxPen( theTheme.Colour( clrMeterOutputPen ), 1, wxPENSTYLE_SOLID); + mBrush = wxBrush( theTheme.Colour( clrMeterOutputBrush ), wxBRUSHSTYLE_SOLID); + mRMSBrush = wxBrush( theTheme.Colour( clrMeterOutputRMSBrush ), wxBRUSHSTYLE_SOLID); + mClipBrush = wxBrush( theTheme.Colour( clrMeterOutputClipBrush ), wxBRUSHSTYLE_SOLID); // mLightPen = wxPen( theTheme.Colour( clrMeterOutputLightPen ), 1, wxSOLID); // mDarkPen = wxPen( theTheme.Colour( clrMeterOutputDarkPen ), 1, wxSOLID); }