From bbd8f8af4925123462d37c6fe9fcbd971c55c2f5 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Thu, 15 Jan 2009 20:49:57 +0000 Subject: [PATCH] make sure group boxes don't get the big font git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58122 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/osx/carbon/radiobox.h | 2 ++ include/wx/osx/carbon/statbox.h | 3 +++ src/osx/radiobox_osx.cpp | 9 +++++++++ src/osx/statbox_osx.cpp | 9 +++++++++ 4 files changed, 23 insertions(+) diff --git a/include/wx/osx/carbon/radiobox.h b/include/wx/osx/carbon/radiobox.h index ac0747ff24..6890aaafb7 100644 --- a/include/wx/osx/carbon/radiobox.h +++ b/include/wx/osx/carbon/radiobox.h @@ -76,6 +76,8 @@ public: virtual wxString GetLabel() const; virtual void SetLabel(const wxString& label) ; + // protect native font of box + virtual bool SetFont( const wxFont &font ); // Other external functions void Command(wxCommandEvent& event); void SetFocus(); diff --git a/include/wx/osx/carbon/statbox.h b/include/wx/osx/carbon/statbox.h index 7c1c2204cf..b7b86b08a9 100644 --- a/include/wx/osx/carbon/statbox.h +++ b/include/wx/osx/carbon/statbox.h @@ -46,6 +46,9 @@ class WXDLLIMPEXP_CORE wxStaticBox: public wxControl virtual void GetBordersForSizer(int *borderTop, int *borderOther) const; virtual bool AcceptsFocus() const { return false; } + + // protect native font of box + virtual bool SetFont( const wxFont &font ); }; #endif diff --git a/src/osx/radiobox_osx.cpp b/src/osx/radiobox_osx.cpp index dec4feb9a1..f6dc751f75 100644 --- a/src/osx/radiobox_osx.cpp +++ b/src/osx/radiobox_osx.cpp @@ -516,4 +516,13 @@ wxSize wxRadioBox::DoGetBestSize() const return wxSize( totWidth, totHeight ); } +bool wxRadioBox::SetFont(const wxFont& font) +{ + bool retval = wxWindowBase::SetFont( font ); + + // dont' update the native control, it has its own small font + + return retval; +} + #endif // wxUSE_RADIOBOX diff --git a/src/osx/statbox_osx.cpp b/src/osx/statbox_osx.cpp index 2b7b57ee08..7f4d5a8010 100644 --- a/src/osx/statbox_osx.cpp +++ b/src/osx/statbox_osx.cpp @@ -65,5 +65,14 @@ void wxStaticBox::GetBordersForSizer(int *borderTop, int *borderOther) const *borderOther = other; } +bool wxStaticBox::SetFont(const wxFont& font) +{ + bool retval = wxWindowBase::SetFont( font ); + + // dont' update the native control, it has its own small font + + return retval; +} + #endif // wxUSE_STATBOX -- 2.45.2