mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-14 23:30:23 +02:00
Bug1193: Mac font sizes as in 2.1.1 for ruler, sel toolbars
This commit is contained in:
parent
21ea9a5ead
commit
de9579dbe9
@ -113,7 +113,14 @@ void SelectionBar::Populate()
|
|||||||
mLeftTime = mRightTime = mAudioTime = nullptr;
|
mLeftTime = mRightTime = mAudioTime = nullptr;
|
||||||
|
|
||||||
// This will be inherited by all children:
|
// 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;
|
wxFlexGridSizer *mainSizer;
|
||||||
|
|
||||||
|
@ -110,7 +110,14 @@ void SpectralSelectionBar::Populate()
|
|||||||
gPrefs->Read(preferencePath, &mbCenterAndWidth, true);
|
gPrefs->Read(preferencePath, &mbCenterAndWidth, true);
|
||||||
|
|
||||||
// This will be inherited by all children:
|
// 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
|
/* 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
|
* to do some look-ups, so we'll have to create one. We can't make the
|
||||||
|
@ -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
|
wxString exampleText = wxT("0.9"); //ignored for height calcs on all platforms
|
||||||
int desiredPixelHeight;
|
int desiredPixelHeight;
|
||||||
|
|
||||||
|
|
||||||
|
static const int MinPixelHeight = 10; // 8;
|
||||||
|
static const int MaxPixelHeight =
|
||||||
|
#ifdef __WXMAC__
|
||||||
|
10
|
||||||
|
#else
|
||||||
|
12
|
||||||
|
#endif
|
||||||
|
;
|
||||||
|
|
||||||
if (mOrientation == wxHORIZONTAL)
|
if (mOrientation == wxHORIZONTAL)
|
||||||
desiredPixelHeight = mBottom - mTop - 5; // height less ticks and 1px gap
|
desiredPixelHeight = mBottom - mTop - 5; // height less ticks and 1px gap
|
||||||
else
|
else
|
||||||
desiredPixelHeight = 12; // why 12? 10 -> 12 seems to be max/min
|
desiredPixelHeight = MaxPixelHeight;
|
||||||
|
|
||||||
if (desiredPixelHeight < 10)//8)
|
desiredPixelHeight =
|
||||||
desiredPixelHeight = 10;//8;
|
std::max(MinPixelHeight, std::min(MaxPixelHeight,
|
||||||
if (desiredPixelHeight > 12)
|
desiredPixelHeight));
|
||||||
desiredPixelHeight = 12;
|
|
||||||
|
|
||||||
// Keep making the font bigger until it's too big, then subtract one.
|
// Keep making the font bigger until it's too big, then subtract one.
|
||||||
mDC->SetFont(wxFont(fontSize, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD));
|
mDC->SetFont(wxFont(fontSize, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user