1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-06 23:02:42 +02:00

Bug1193: Mac font sizes as in 2.1.1 for ruler, sel toolbars

This commit is contained in:
Paul Licameli 2016-06-22 14:08:55 -04:00
parent 21ea9a5ead
commit de9579dbe9
3 changed files with 30 additions and 7 deletions

View File

@ -113,7 +113,14 @@ void SelectionBar::Populate()
mLeftTime = mRightTime = mAudioTime = nullptr;
// This will be inherited by all children:
SetFont(wxFont(9, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL));
SetFont(wxFont(
#ifdef __WXMAC__
12
#else
9
#endif
,
wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL));
wxFlexGridSizer *mainSizer;

View File

@ -110,7 +110,14 @@ void SpectralSelectionBar::Populate()
gPrefs->Read(preferencePath, &mbCenterAndWidth, true);
// This will be inherited by all children:
SetFont(wxFont(9, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL));
SetFont(wxFont(
#ifdef __WXMAC__
12
#else
9
#endif
,
wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL));
/* we don't actually need a control yet, but we want to use its methods
* to do some look-ups, so we'll have to create one. We can't make the

View File

@ -996,15 +996,24 @@ void Ruler::Update(const TimeTrack* timetrack)// Envelope *speedEnv, long minSpe
wxString exampleText = wxT("0.9"); //ignored for height calcs on all platforms
int desiredPixelHeight;
static const int MinPixelHeight = 10; // 8;
static const int MaxPixelHeight =
#ifdef __WXMAC__
10
#else
12
#endif
;
if (mOrientation == wxHORIZONTAL)
desiredPixelHeight = mBottom - mTop - 5; // height less ticks and 1px gap
else
desiredPixelHeight = 12; // why 12? 10 -> 12 seems to be max/min
desiredPixelHeight = MaxPixelHeight;
if (desiredPixelHeight < 10)//8)
desiredPixelHeight = 10;//8;
if (desiredPixelHeight > 12)
desiredPixelHeight = 12;
desiredPixelHeight =
std::max(MinPixelHeight, std::min(MaxPixelHeight,
desiredPixelHeight));
// Keep making the font bigger until it's too big, then subtract one.
mDC->SetFont(wxFont(fontSize, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD));