]> git.saurik.com Git - wxWidgets.git/commitdiff
use size of wxNORMAL_FONT instead of hard coded 12 points
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 22 Aug 2006 10:32:48 +0000 (10:32 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 22 Aug 2006 10:32:48 +0000 (10:32 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40740 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/font/font.cpp

index 316878bdfb8cc24ec1f46d25fbe001346792f510..ca7ef1bc27436cc7c6b7ac613aff64dc341c5573 100644 (file)
@@ -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() )