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
This commit is contained in:
@@ -252,7 +252,7 @@ bool MyApp::OnInit()
|
|||||||
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
|
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
|
||||||
: wxFrame((wxFrame *)NULL, wxID_ANY, title, pos, size), m_textctrl(NULL)
|
: wxFrame((wxFrame *)NULL, wxID_ANY, title, pos, size), m_textctrl(NULL)
|
||||||
{
|
{
|
||||||
m_fontSize = 12;
|
m_fontSize = wxNORMAL_FONT->GetPointSize();
|
||||||
|
|
||||||
SetIcon(wxIcon(sample_xpm));
|
SetIcon(wxIcon(sample_xpm));
|
||||||
|
|
||||||
@@ -439,7 +439,8 @@ bool MyFrame::DoEnumerateFamilies(bool fixedWidthOnly,
|
|||||||
|
|
||||||
if ( !facename.empty() )
|
if ( !facename.empty() )
|
||||||
{
|
{
|
||||||
wxFont font(12, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL,
|
wxFont font(wxNORMAL_FONT->GetPointSize(),
|
||||||
|
wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL,
|
||||||
wxFONTWEIGHT_NORMAL, false, facename, encoding);
|
wxFONTWEIGHT_NORMAL, false, facename, encoding);
|
||||||
|
|
||||||
DoChangeFont(font);
|
DoChangeFont(font);
|
||||||
@@ -780,7 +781,8 @@ void MyFrame::OnViewMsg(wxCommandEvent& WXUNUSED(event))
|
|||||||
// and now create the correct font
|
// and now create the correct font
|
||||||
if ( !DoEnumerateFamilies(false, fontenc, true /* silent */) )
|
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 */,
|
wxFONTWEIGHT_NORMAL, false /* !underlined */,
|
||||||
wxEmptyString /* facename */, fontenc);
|
wxEmptyString /* facename */, fontenc);
|
||||||
if ( font.Ok() )
|
if ( font.Ok() )
|
||||||
|
Reference in New Issue
Block a user