Use only wxFont ctor from wxFontInfo in the samples

Follow the documentation advice and prefer to use the ctor taking
wxFontInfo as it makes the code slightly shorter and more readable.
This commit is contained in:
Vadim Zeitlin
2018-09-17 15:29:42 +02:00
parent b1dcdb864c
commit 2cc44337c6
9 changed files with 9 additions and 14 deletions

View File

@@ -489,7 +489,7 @@ bool MyGLCanvas::oglInit()
int swi = 0, shi = 0; //Image sizes
wxString stg("wxWidgets");
// Set the font. Use a big pointsize so as to smoothing edges.
wxFont font(48, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
wxFont font(wxFontInfo(48).Family(wxFONTFAMILY_MODERN));
if ( !font.IsOk() )
font = *wxSWISS_FONT;
wxColour bgrdColo(*wxBLACK);