From c15ca44eff4137f3be422f3dcc469c7dfd7d53d8 Mon Sep 17 00:00:00 2001 From: Leland Lucius Date: Mon, 10 Aug 2015 02:02:50 -0500 Subject: [PATCH] Disable autocreation of Xcode schemes --- .gitignore | 1 - .../xcshareddata/WorkspaceSettings.xcsettings | 8 ++++++ src/AudacityApp.h | 2 -- src/widgets/Ruler.cpp | 27 +++++-------------- 4 files changed, 15 insertions(+), 23 deletions(-) create mode 100644 mac/Audacity.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/.gitignore b/.gitignore index 70a795471..de09d600d 100644 --- a/.gitignore +++ b/.gitignore @@ -46,7 +46,6 @@ # Mac Specific .DS_Store -project.xcworkspace xcuserdata *.xcconfig mac/build diff --git a/mac/Audacity.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/mac/Audacity.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 000000000..08de0be8d --- /dev/null +++ b/mac/Audacity.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded + + + diff --git a/src/AudacityApp.h b/src/AudacityApp.h index 011307a7a..00a331a07 100644 --- a/src/AudacityApp.h +++ b/src/AudacityApp.h @@ -234,13 +234,11 @@ 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); } diff --git a/src/widgets/Ruler.cpp b/src/widgets/Ruler.cpp index 9e19fd1b2..52331c598 100644 --- a/src/widgets/Ruler.cpp +++ b/src/widgets/Ruler.cpp @@ -136,14 +136,6 @@ 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; @@ -314,14 +306,6 @@ 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; @@ -1015,15 +999,18 @@ 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); @@ -1608,7 +1595,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() @@ -1620,6 +1607,7 @@ RulerPanel::RulerPanel(wxWindow* parent, wxWindowID id, const wxSize& size /*= wxDefaultSize*/): wxPanel(parent, id, pos, size) { + SetBackgroundStyle(wxBG_STYLE_PAINT); } RulerPanel::~RulerPanel() @@ -1683,7 +1671,6 @@ enum { }; BEGIN_EVENT_TABLE(AdornedRulerPanel, wxPanel) - EVT_ERASE_BACKGROUND(AdornedRulerPanel::OnErase) EVT_PAINT(AdornedRulerPanel::OnPaint) EVT_SIZE(AdornedRulerPanel::OnSize) EVT_MOUSE_EVENTS(AdornedRulerPanel::OnMouseEvents) @@ -1836,7 +1823,7 @@ void AdornedRulerPanel::OnErase(wxEraseEvent & WXUNUSED(evt)) void AdornedRulerPanel::OnPaint(wxPaintEvent & WXUNUSED(evt)) { - wxBufferedPaintDC dc(this); + wxAutoBufferedPaintDC dc(this); DoDrawBorder(&dc);