From 08a3c2672c9776f2b22b6a67385f75abb71d5607 Mon Sep 17 00:00:00 2001 From: lllucius Date: Tue, 7 Oct 2014 21:27:55 +0000 Subject: [PATCH] 2nd try at getting the TimeTextControl font correct. --- src/widgets/TimeTextCtrl.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/widgets/TimeTextCtrl.cpp b/src/widgets/TimeTextCtrl.cpp index b20866a7e..bc709deed 100644 --- a/src/widgets/TimeTextCtrl.cpp +++ b/src/widgets/TimeTextCtrl.cpp @@ -1056,18 +1056,18 @@ bool TimeTextCtrl::Layout() wxString exampleText = wxT("0"); // Keep making the font bigger until it's too big, then subtract one. - memDC.SetFont(wxFont(fontSize, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); + memDC.SetFont(wxFont(fontSize, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); memDC.GetTextExtent(exampleText, &strW, &strH); while(strW <= mDigitBoxW && strH <= mDigitBoxH) { fontSize++; - memDC.SetFont(wxFont(fontSize, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); + memDC.SetFont(wxFont(fontSize, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); memDC.GetTextExtent(exampleText, &strW, &strH); } fontSize--; if (mDigitFont) delete mDigitFont; - mDigitFont = new wxFont(fontSize, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL); + mDigitFont = new wxFont(fontSize, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL); memDC.SetFont(*mDigitFont); memDC.GetTextExtent(exampleText, &strW, &strH); mDigitW = strW; @@ -1077,7 +1077,7 @@ bool TimeTextCtrl::Layout() fontSize--; if (mLabelFont) delete mLabelFont; - mLabelFont = new wxFont(fontSize, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL); + mLabelFont = new wxFont(fontSize, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL); // Figure out the x-position of each field and label in the box x = mBorderLeft;