Don't use deprecated wxBOLD, wxNORMAL and similar constants.

Replace them with wxFONTWEIGHT_BOLD, wxFONTSTYLE_NORMAL or wxFONTWEIGHT_NORMAL
and equivalents in the code of the library itself and in the samples.

Also simplify font construction using wxFontInfo where possible to avoid
specifying these constants at all if they are not needed.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-01-11 14:25:30 +00:00
parent 7696081c90
commit d66e7af9aa
21 changed files with 192 additions and 198 deletions

View File

@@ -698,9 +698,8 @@ void MyPrintout::DrawPageTwo()
wxT("testing "), wxT("string. "), wxT("Enjoy "), wxT("it!") };
wxCoord w, h;
long x = 200, y= 250;
wxFont fnt(15, wxSWISS, wxNORMAL, wxNORMAL);
dc->SetFont(fnt);
dc->SetFont(wxFontInfo(15).Family(wxFONTFAMILY_SWISS));
for (int i = 0; i < 7; i++)
{
@@ -746,15 +745,6 @@ void MyPrintout::DrawPageTwo()
// Writes a header on a page. Margin units are in millimetres.
bool MyPrintout::WritePageHeader(wxPrintout *printout, wxDC *dc, const wxString&text, float mmToLogical)
{
#if 0
static wxFont *headerFont = (wxFont *) NULL;
if (!headerFont)
{
headerFont = wxTheFontList->FindOrCreateFont(16, wxSWISS, wxNORMAL, wxBOLD);
}
dc->SetFont(headerFont);
#endif
int pageWidthMM, pageHeightMM;
printout->GetPageSizeMM(&pageWidthMM, &pageHeightMM);