Fix tons of warnings in wxMSW after deprecating wxPen/wxBrush int styles &c.
Replacement of FUTURE_WXWIN_COMPATIBILITY_3_0 with WXWIN_COMPATIBILITY_3_0 in r75532 resulted in tons of warnings as all code using wxSOLID and similar constants now uses the deprecated methods taking int instead of the preferred ones taking wx{Pen,Brush}Style (and similarly for wxFont{Style,Weight,Family}). Fix all of them but this also would seem to mean that this change might not be such a good idea at all. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75547 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2219,15 +2219,15 @@ wxFont wxXmlResourceHandlerImpl::GetFont(const wxString& param, wxWindow* parent
|
||||
isize = GetLong(wxT("size"), -1);
|
||||
|
||||
// style
|
||||
int istyle = wxNORMAL;
|
||||
wxFontStyle istyle = wxFONTSTYLE_NORMAL;
|
||||
bool hasStyle = HasParam(wxT("style"));
|
||||
if (hasStyle)
|
||||
{
|
||||
wxString style = GetParamValue(wxT("style"));
|
||||
if (style == wxT("italic"))
|
||||
istyle = wxITALIC;
|
||||
istyle = wxFONTSTYLE_ITALIC;
|
||||
else if (style == wxT("slant"))
|
||||
istyle = wxSLANT;
|
||||
istyle = wxFONTSTYLE_SLANT;
|
||||
else if (style != wxT("normal"))
|
||||
{
|
||||
ReportParamError
|
||||
@@ -2239,15 +2239,15 @@ wxFont wxXmlResourceHandlerImpl::GetFont(const wxString& param, wxWindow* parent
|
||||
}
|
||||
|
||||
// weight
|
||||
int iweight = wxNORMAL;
|
||||
wxFontWeight iweight = wxFONTWEIGHT_NORMAL;
|
||||
bool hasWeight = HasParam(wxT("weight"));
|
||||
if (hasWeight)
|
||||
{
|
||||
wxString weight = GetParamValue(wxT("weight"));
|
||||
if (weight == wxT("bold"))
|
||||
iweight = wxBOLD;
|
||||
iweight = wxFONTWEIGHT_BOLD;
|
||||
else if (weight == wxT("light"))
|
||||
iweight = wxLIGHT;
|
||||
iweight = wxFONTWEIGHT_LIGHT;
|
||||
else if (weight != wxT("normal"))
|
||||
{
|
||||
ReportParamError
|
||||
@@ -2263,17 +2263,17 @@ wxFont wxXmlResourceHandlerImpl::GetFont(const wxString& param, wxWindow* parent
|
||||
bool underlined = hasUnderlined ? GetBool(wxT("underlined"), false) : false;
|
||||
|
||||
// family and facename
|
||||
int ifamily = wxDEFAULT;
|
||||
wxFontFamily ifamily = wxFONTFAMILY_DEFAULT;
|
||||
bool hasFamily = HasParam(wxT("family"));
|
||||
if (hasFamily)
|
||||
{
|
||||
wxString family = GetParamValue(wxT("family"));
|
||||
if (family == wxT("decorative")) ifamily = wxDECORATIVE;
|
||||
else if (family == wxT("roman")) ifamily = wxROMAN;
|
||||
else if (family == wxT("script")) ifamily = wxSCRIPT;
|
||||
else if (family == wxT("swiss")) ifamily = wxSWISS;
|
||||
else if (family == wxT("modern")) ifamily = wxMODERN;
|
||||
else if (family == wxT("teletype")) ifamily = wxTELETYPE;
|
||||
if (family == wxT("decorative")) ifamily = wxFONTFAMILY_DECORATIVE;
|
||||
else if (family == wxT("roman")) ifamily = wxFONTFAMILY_ROMAN;
|
||||
else if (family == wxT("script")) ifamily = wxFONTFAMILY_SCRIPT;
|
||||
else if (family == wxT("swiss")) ifamily = wxFONTFAMILY_SWISS;
|
||||
else if (family == wxT("modern")) ifamily = wxFONTFAMILY_MODERN;
|
||||
else if (family == wxT("teletype")) ifamily = wxFONTFAMILY_TELETYPE;
|
||||
else
|
||||
{
|
||||
ReportParamError
|
||||
|
Reference in New Issue
Block a user