X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/441b46ac5e09a531b4a64180fa6ec9f4777d23a0..62f864c32c53356b7228591c85b14abc491c46f0:/src/mac/carbon/stattext.cpp diff --git a/src/mac/carbon/stattext.cpp b/src/mac/carbon/stattext.cpp index f21e1a9ee8..1feace5180 100644 --- a/src/mac/carbon/stattext.cpp +++ b/src/mac/carbon/stattext.cpp @@ -9,10 +9,14 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "stattext.h" #endif +#include "wx/wxprec.h" + +#if wxUSE_STATTEXT + #include "wx/app.h" #include "wx/stattext.h" #include "wx/notebook.h" @@ -24,9 +28,7 @@ #include -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxStaticText, wxControl) -#endif #include "wx/mac/uma.h" @@ -49,7 +51,7 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id, Rect bounds = wxMacGetBoundsForControl( this , pos , size ) ; wxMacCFStringHolder str(m_label,m_font.GetEncoding() ) ; - m_peer = new wxMacControl() ; + m_peer = new wxMacControl(this) ; verify_noerr(CreateStaticTextControl(MAC_WXHWND(parent->MacGetTopLevelWindowRef()),&bounds, str , NULL , m_peer->GetControlRefAddr() ) ) ; @@ -78,6 +80,9 @@ wxSize wxStaticText::DoGetBestSize() const } if ( m_label.Length() == 0 ) bounds.h = 0 ; + + bounds.h += MacGetLeftBorderSize() + MacGetRightBorderSize() ; + bounds.v += MacGetTopBorderSize() + MacGetBottomBorderSize() ; return wxSize(bounds.h, bounds.v); } @@ -114,3 +119,6 @@ bool wxStaticText::SetFont(const wxFont& font) return ret; } + +#endif //if wxUSE_STATTEXT +