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:
@@ -337,8 +337,7 @@ void MyCanvas::CreateCaret()
|
||||
|
||||
void MyCanvas::SetFontSize(int fontSize)
|
||||
{
|
||||
m_font = wxFont(fontSize, wxFONTFAMILY_TELETYPE,
|
||||
wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
|
||||
m_font = wxFont(wxFontInfo(fontSize).Family(wxFONTFAMILY_TELETYPE));
|
||||
|
||||
wxClientDC dc(this);
|
||||
dc.SetFont(m_font);
|
||||
|
Reference in New Issue
Block a user