support for inheriting non-standard attributes (explicit fonts instead of window variants), fixes #3583

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73047 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2012-11-28 10:13:41 +00:00
parent 1e70e497e2
commit cb04da13bd

View File

@@ -350,7 +350,11 @@ void wxWindowMac::SetPeer(wxOSXWidgetImpl* peer)
GetParent()->MacChildAdded() ;
// adjust font, controlsize etc
DoSetWindowVariant( m_windowVariant ) ;
GetPeer()->SetControlSize( m_windowVariant );
InheritAttributes();
// in case nothing has been set, use the variant default fonts
if ( !m_hasFont )
DoSetWindowVariant( m_windowVariant );
GetPeer()->SetLabel( wxStripMenuCodes(m_label, wxStrip_Mnemonics), GetFont().GetEncoding() ) ;