]> git.saurik.com Git - wxWidgets.git/commitdiff
support for inheriting non-standard attributes (explicit fonts instead of window...
authorStefan Csomor <csomor@advancedconcepts.ch>
Wed, 28 Nov 2012 10:13:41 +0000 (10:13 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Wed, 28 Nov 2012 10:13:41 +0000 (10:13 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73047 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/window_osx.cpp

index fadfabf4bd848ce28757db0f879d4b9bd5eeb844..6e941b3166128301c7359e6fad97461f50dfef51 100644 (file)
@@ -350,7 +350,11 @@ void wxWindowMac::SetPeer(wxOSXWidgetImpl* peer)
         GetParent()->MacChildAdded() ;
         
         // adjust font, controlsize etc
         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() ) ;
         
         
         GetPeer()->SetLabel( wxStripMenuCodes(m_label, wxStrip_Mnemonics), GetFont().GetEncoding() ) ;