1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-10 08:33:36 +02:00

Fix incorrect font setting introduced in r13403

https://code.google.com/p/audacity/source/detail?r=13403
This commit is contained in:
lllucius
2014-10-07 18:26:50 +00:00
parent 4e85bc5148
commit 6fd448d1be

View File

@@ -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_TELETYPE, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL));
memDC.SetFont(wxFont(fontSize, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL));
memDC.GetTextExtent(exampleText, &strW, &strH);
while(strW <= mDigitBoxW && strH <= mDigitBoxH) {
fontSize++;
memDC.SetFont(wxFont(fontSize, wxFONTFAMILY_TELETYPE, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL));
memDC.SetFont(wxFont(fontSize, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL));
memDC.GetTextExtent(exampleText, &strW, &strH);
}
fontSize--;
if (mDigitFont)
delete mDigitFont;
mDigitFont = new wxFont(fontSize, wxFONTFAMILY_TELETYPE, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
mDigitFont = new wxFont(fontSize, wxFONTFAMILY_SWISS, 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_TELETYPE, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
mLabelFont = new wxFont(fontSize, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
// Figure out the x-position of each field and label in the box
x = mBorderLeft;