mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-03 15:20:17 +01:00
Revert "Disable autocreation of Xcode schemes"
This reverts commit c15ca44eff.
This commit is contained in:
@@ -234,11 +234,13 @@ extern AudacityApp & wxGetApp();
|
||||
#if defined(__WXMAC__)
|
||||
inline void EnableAntialiasing(wxDC & dc)
|
||||
{
|
||||
dc.GetGraphicsContext()->EnableOffset(false);
|
||||
dc.GetGraphicsContext()->SetAntialiasMode(wxANTIALIAS_DEFAULT);
|
||||
}
|
||||
|
||||
inline void DisableAntialiasing(wxDC & dc)
|
||||
{
|
||||
dc.GetGraphicsContext()->EnableOffset(true);
|
||||
dc.GetGraphicsContext()->SetAntialiasMode(wxANTIALIAS_NONE);
|
||||
}
|
||||
|
||||
|
||||
@@ -136,6 +136,14 @@ Ruler::Ruler()
|
||||
|
||||
mUserFonts = false;
|
||||
|
||||
#if !wxCHECK_VERSION(3, 0, 0)
|
||||
#ifdef __WXMAC__
|
||||
mMinorMinorFont->SetNoAntiAliasing(true);
|
||||
mMinorFont->SetNoAntiAliasing(true);
|
||||
mMajorFont->SetNoAntiAliasing(true);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
mMajorLabels = 0;
|
||||
mMinorLabels = 0;
|
||||
mMinorMinorLabels = 0;
|
||||
@@ -306,6 +314,14 @@ void Ruler::SetFonts(const wxFont &minorFont, const wxFont &majorFont, const wxF
|
||||
*mMinorFont = minorFont;
|
||||
*mMajorFont = majorFont;
|
||||
|
||||
#if !wxCHECK_VERSION(3, 0, 0)
|
||||
#ifdef __WXMAC__
|
||||
mMinorMinorFont->SetNoAntiAliasing(true);
|
||||
mMinorFont->SetNoAntiAliasing(true);
|
||||
mMajorFont->SetNoAntiAliasing(true);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Won't override these fonts
|
||||
mUserFonts = true;
|
||||
|
||||
@@ -999,18 +1015,15 @@ void Ruler::Update(TimeTrack* timetrack)// Envelope *speedEnv, long minSpeed, lo
|
||||
desiredPixelHeight = 10;//8;
|
||||
if (desiredPixelHeight > 12)
|
||||
desiredPixelHeight = 12;
|
||||
printf("desired h %d\n", desiredPixelHeight);
|
||||
|
||||
// Keep making the font bigger until it's too big, then subtract one.
|
||||
mDC->SetFont(wxFont(fontSize, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD));
|
||||
mDC->GetTextExtent(exampleText, &strW, &strH, &strD, &strL);
|
||||
printf("strW %d h %d d %d l %d\n", strW, strH, strD, strL);
|
||||
while ((strH - strD - strL) <= desiredPixelHeight && fontSize < 40) {
|
||||
fontSize++;
|
||||
mDC->SetFont(wxFont(fontSize, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD));
|
||||
mDC->GetTextExtent(exampleText, &strW, &strH, &strD, &strL);
|
||||
printf("size %d strW %d h %d d %d l %d\n", fontSize, strW, strH, strD, strL);
|
||||
}
|
||||
printf("fontSize = %d\n", fontSize);
|
||||
fontSize--;
|
||||
mDC->SetFont(wxFont(fontSize, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL));
|
||||
mDC->GetTextExtent(exampleText, &strW, &strH, &strD, &strL);
|
||||
@@ -1595,7 +1608,7 @@ void Ruler::SetUseZoomInfo(int leftOffset)
|
||||
//
|
||||
|
||||
BEGIN_EVENT_TABLE(RulerPanel, wxPanel)
|
||||
// EVT_ERASE_BACKGROUND(RulerPanel::OnErase)
|
||||
EVT_ERASE_BACKGROUND(RulerPanel::OnErase)
|
||||
EVT_PAINT(RulerPanel::OnPaint)
|
||||
EVT_SIZE(RulerPanel::OnSize)
|
||||
END_EVENT_TABLE()
|
||||
@@ -1607,7 +1620,6 @@ RulerPanel::RulerPanel(wxWindow* parent, wxWindowID id,
|
||||
const wxSize& size /*= wxDefaultSize*/):
|
||||
wxPanel(parent, id, pos, size)
|
||||
{
|
||||
SetBackgroundStyle(wxBG_STYLE_PAINT);
|
||||
}
|
||||
|
||||
RulerPanel::~RulerPanel()
|
||||
@@ -1671,6 +1683,7 @@ enum {
|
||||
};
|
||||
|
||||
BEGIN_EVENT_TABLE(AdornedRulerPanel, wxPanel)
|
||||
EVT_ERASE_BACKGROUND(AdornedRulerPanel::OnErase)
|
||||
EVT_PAINT(AdornedRulerPanel::OnPaint)
|
||||
EVT_SIZE(AdornedRulerPanel::OnSize)
|
||||
EVT_MOUSE_EVENTS(AdornedRulerPanel::OnMouseEvents)
|
||||
@@ -1823,7 +1836,7 @@ void AdornedRulerPanel::OnErase(wxEraseEvent & WXUNUSED(evt))
|
||||
|
||||
void AdornedRulerPanel::OnPaint(wxPaintEvent & WXUNUSED(evt))
|
||||
{
|
||||
wxAutoBufferedPaintDC dc(this);
|
||||
wxBufferedPaintDC dc(this);
|
||||
|
||||
DoDrawBorder(&dc);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user