mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-23 17:30:17 +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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user