From b043f38bcb58bbf7acce22372cf4cad208f5530b Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Wed, 1 Nov 2006 08:58:24 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=11433 --- checkin_notes | 6 ++++-- clientgui/sg_CustomControls.cpp | 15 +++++++++++++++ clientgui/sg_CustomControls.h | 3 +++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/checkin_notes b/checkin_notes index 3f89ce9d3e..69de456742 100755 --- a/checkin_notes +++ b/checkin_notes @@ -11937,12 +11937,14 @@ Rom 31 Oct 2006 - Tag for 5.7.1 release, all platforms boinc_core_release_5_7_1 -Charlie 31 Oct 2006 +Charlie 1 Nov 2006 - Mac: Work around Simple GUI hang due to bug in Mac version of - wxBufferedDC.GetTextExtent(). + wxBufferedDC.GetTextExtent(). + -Mac: Fix transparent text. - Mac: more changes to XCode project to better build Simple GUI. clientgui/ + sg_CustomControls.cpp, .h sg_ViewTabPage.cpp mac_build/ boinc.xcodeproj/ diff --git a/clientgui/sg_CustomControls.cpp b/clientgui/sg_CustomControls.cpp index 7ad6175fc4..c07f798388 100644 --- a/clientgui/sg_CustomControls.cpp +++ b/clientgui/sg_CustomControls.cpp @@ -61,6 +61,9 @@ void CTransparentStaticLine::OnPaint(wxPaintEvent& /*event*/) { IMPLEMENT_DYNAMIC_CLASS (CTransparentStaticText, wxStaticText) BEGIN_EVENT_TABLE(CTransparentStaticText, wxStaticText) +#ifdef __WXMAC__ + EVT_ERASE_BACKGROUND(CTransparentStaticText::OnEraseBackground) +#endif EVT_PAINT(CTransparentStaticText::OnPaint) END_EVENT_TABLE() @@ -184,3 +187,15 @@ void CTransparentStaticTextAssociate::OnMouse(wxMouseEvent& event) { event.Skip(); } + +#if 0 +void CTransparentStaticTextAssociate::OnEraseBackground(wxEraseEvent& event){ + CSkinSimple* pSkinSimple = wxGetApp().GetSkinManager()->GetSimple(); + + wxASSERT(pSkinSimple); + wxASSERT(wxDynamicCast(pSkinSimple, CSkinSimple)); + + wxDC *dc = event.GetDC(); + dc->DrawBitmap(*pSkinSimple->GetPreferencesDialogBackgroundImage()->GetBitmap(), 0, 0); +} +#endif diff --git a/clientgui/sg_CustomControls.h b/clientgui/sg_CustomControls.h index 14b40dd7ee..57053025b9 100644 --- a/clientgui/sg_CustomControls.h +++ b/clientgui/sg_CustomControls.h @@ -91,6 +91,9 @@ public: virtual bool HasTransparentBackground() { return true; }; +#ifdef __WXMAC__ + virtual void OnEraseBackground(wxEraseEvent& /*event*/) {}; +#endif virtual void OnPaint(wxPaintEvent& event); DECLARE_EVENT_TABLE()