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:
@@ -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));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user