]> git.saurik.com Git - wxWidgets.git/commitdiff
proper theme fonts
authorStefan Csomor <csomor@advancedconcepts.ch>
Sat, 27 Mar 2004 08:29:51 +0000 (08:29 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sat, 27 Mar 2004 08:29:51 +0000 (08:29 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/gdicmn.cpp

index ac407e93d92b0a9b2b55ad5f679ac307fb01d856..049d1339dde84613c2b7a55157558d0aa6630ab0 100644 (file)
@@ -531,6 +531,7 @@ void wxInitializeStockObjects ()
 #endif
 */
 #if defined(__WXMAC__)
+    // retrieve size of system font for all stock fonts
     int sizeFont = 12;
 
     Str255 fontName ;
@@ -539,7 +540,12 @@ void wxInitializeStockObjects ()
 
        GetThemeFont(kThemeSystemFont , GetApplicationScript() , fontName , &fontSize , &fontStyle ) ;
        sizeFont = fontSize ;
+#if __WXMAC_CLASSIC__
     wxNORMAL_FONT = new wxFont (fontSize, wxMODERN, wxNORMAL, wxNORMAL , false , wxMacMakeStringFromPascal(fontName) );
+#else
+    wxNORMAL_FONT = new wxFont () ;
+    wxNORMAL_FONT->MacCreateThemeFont( kThemeSystemFont );
+#endif
 #elif defined(__WXPM__)
   static const int sizeFont = 12;
 #else
@@ -559,8 +565,13 @@ void wxInitializeStockObjects ()
 #elif defined(__WXMAC__)
     wxSWISS_FONT = new wxFont (sizeFont, wxSWISS, wxNORMAL, wxNORMAL); /* Helv */
     wxITALIC_FONT = new wxFont (sizeFont, wxROMAN, wxITALIC, wxNORMAL);
+#if __WXMAC_CLASSIC__
        GetThemeFont(kThemeSmallSystemFont , GetApplicationScript() , fontName , &fontSize , &fontStyle ) ;
     wxSMALL_FONT = new wxFont (fontSize, wxSWISS, wxNORMAL, wxNORMAL , false , wxMacMakeStringFromPascal( fontName ) );
+#else
+    wxSMALL_FONT = new wxFont () ;
+    wxSMALL_FONT->MacCreateThemeFont( kThemeSmallSystemFont );
+#endif
 #else
   wxSMALL_FONT = new wxFont (sizeFont - 2, wxSWISS, wxNORMAL, wxNORMAL);
   wxITALIC_FONT = new wxFont (sizeFont, wxROMAN, wxITALIC, wxNORMAL);