From: Vadim Zeitlin Date: Tue, 22 Aug 2006 10:32:48 +0000 (+0000) Subject: use size of wxNORMAL_FONT instead of hard coded 12 points X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/63a8f2d351ff36a964c4d7dd2ff49139f78cb8e1 use size of wxNORMAL_FONT instead of hard coded 12 points git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40740 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/samples/font/font.cpp b/samples/font/font.cpp index 316878bdfb..ca7ef1bc27 100644 --- a/samples/font/font.cpp +++ b/samples/font/font.cpp @@ -252,7 +252,7 @@ bool MyApp::OnInit() MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) : wxFrame((wxFrame *)NULL, wxID_ANY, title, pos, size), m_textctrl(NULL) { - m_fontSize = 12; + m_fontSize = wxNORMAL_FONT->GetPointSize(); SetIcon(wxIcon(sample_xpm)); @@ -439,7 +439,8 @@ bool MyFrame::DoEnumerateFamilies(bool fixedWidthOnly, if ( !facename.empty() ) { - wxFont font(12, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, + wxFont font(wxNORMAL_FONT->GetPointSize(), + wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, facename, encoding); DoChangeFont(font); @@ -780,7 +781,8 @@ void MyFrame::OnViewMsg(wxCommandEvent& WXUNUSED(event)) // and now create the correct font if ( !DoEnumerateFamilies(false, fontenc, true /* silent */) ) { - wxFont font(12, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, + wxFont font(wxNORMAL_FONT->GetPointSize(), + wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false /* !underlined */, wxEmptyString /* facename */, fontenc); if ( font.Ok() )