1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-24 23:33:50 +02: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:
Paul Licameli
2018-07-23 13:21:15 -04:00
parent 0ea56874a6
commit e432883dec
14 changed files with 53 additions and 53 deletions

View File

@@ -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));
}
}