From 9ff647cf66f6c05aacba8eb96b818fc70d7b4939 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Tue, 8 May 2001 11:49:20 +0000 Subject: [PATCH] mac fixes part II git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10047 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/dc.cpp | 4 ++++ src/mac/carbon/stattext.cpp | 10 ++++++---- src/mac/carbon/utils.cpp | 3 ++- src/mac/dc.cpp | 4 ++++ src/mac/stattext.cpp | 10 ++++++---- src/mac/utils.cpp | 3 ++- 6 files changed, 24 insertions(+), 10 deletions(-) diff --git a/src/mac/carbon/dc.cpp b/src/mac/carbon/dc.cpp index 119818f6c6..fbeccc565b 100644 --- a/src/mac/carbon/dc.cpp +++ b/src/mac/carbon/dc.cpp @@ -83,6 +83,10 @@ wxDC::wxDC() m_macClipRect.right = 32000 ; m_macClipRect.bottom = 32000 ; ::GetPort( &m_macOrigPort ) ; + + m_pen = *wxBLACK_PEN; + m_font = *wxNORMAL_FONT; + m_brush = *wxWHITE_BRUSH; }; wxDC::~wxDC(void) diff --git a/src/mac/carbon/stattext.cpp b/src/mac/carbon/stattext.cpp index 5ce406a67a..a99f6c4e69 100644 --- a/src/mac/carbon/stattext.cpp +++ b/src/mac/carbon/stattext.cpp @@ -61,7 +61,7 @@ void wxStaticText::OnDraw( wxDC &dc ) return; PrepareDC(dc); - dc.Clear() ; +// dc.Clear() ; this eventually draws in the wrong background colour (appearance panels) int x = 0 ; int y = 0 ; @@ -259,7 +259,9 @@ void wxStaticText::SetLabel(const wxString& st ) m_label = st ; if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) ) SetSizeOrDefault() ; - - wxClientDC dc(this); - OnDraw( dc ) ; + + Refresh() ; + MacUpdateImmediately() ; +// wxClientDC dc(this); +// OnDraw( dc ) ; } diff --git a/src/mac/carbon/utils.cpp b/src/mac/carbon/utils.cpp index 28c069a63a..b3137eaf09 100644 --- a/src/mac/carbon/utils.cpp +++ b/src/mac/carbon/utils.cpp @@ -157,7 +157,8 @@ void wxDebugMsg(const char *fmt ...) vsprintf(buffer,fmt,ap) ; strcat(buffer,";g") ; - debugstr(buffer) ; + c2pstr(buffer) ; + DebugStr((unsigned char*) buffer) ; va_end(ap); } diff --git a/src/mac/dc.cpp b/src/mac/dc.cpp index 119818f6c6..fbeccc565b 100644 --- a/src/mac/dc.cpp +++ b/src/mac/dc.cpp @@ -83,6 +83,10 @@ wxDC::wxDC() m_macClipRect.right = 32000 ; m_macClipRect.bottom = 32000 ; ::GetPort( &m_macOrigPort ) ; + + m_pen = *wxBLACK_PEN; + m_font = *wxNORMAL_FONT; + m_brush = *wxWHITE_BRUSH; }; wxDC::~wxDC(void) diff --git a/src/mac/stattext.cpp b/src/mac/stattext.cpp index 5ce406a67a..a99f6c4e69 100644 --- a/src/mac/stattext.cpp +++ b/src/mac/stattext.cpp @@ -61,7 +61,7 @@ void wxStaticText::OnDraw( wxDC &dc ) return; PrepareDC(dc); - dc.Clear() ; +// dc.Clear() ; this eventually draws in the wrong background colour (appearance panels) int x = 0 ; int y = 0 ; @@ -259,7 +259,9 @@ void wxStaticText::SetLabel(const wxString& st ) m_label = st ; if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) ) SetSizeOrDefault() ; - - wxClientDC dc(this); - OnDraw( dc ) ; + + Refresh() ; + MacUpdateImmediately() ; +// wxClientDC dc(this); +// OnDraw( dc ) ; } diff --git a/src/mac/utils.cpp b/src/mac/utils.cpp index 28c069a63a..b3137eaf09 100644 --- a/src/mac/utils.cpp +++ b/src/mac/utils.cpp @@ -157,7 +157,8 @@ void wxDebugMsg(const char *fmt ...) vsprintf(buffer,fmt,ap) ; strcat(buffer,";g") ; - debugstr(buffer) ; + c2pstr(buffer) ; + DebugStr((unsigned char*) buffer) ; va_end(ap); } -- 2.47.2