]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/gdiobj.cpp
Fix crash in wxDC::GetMultiLineTextExtent() after last commit.
[wxWidgets.git] / src / osx / carbon / gdiobj.cpp
index 81fb05c4580768d4133fb08d8d7e364099802935..4a7a3db35278664085b0c3b0e1a623cf5e28a969 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////
-// Name:        src/mac/carbon/gdiobj.cpp
+// Name:        src/osx/carbon/gdiobj.cpp
 // Purpose:     wxGDIObject class
 // Author:      Stefan Csomor
 // Modified by:
 // Purpose:     wxGDIObject class
 // Author:      Stefan Csomor
 // Modified by:
@@ -51,9 +51,6 @@ void wxStockGDIMac::OnExit()
 {
 }
 
 {
 }
 
-extern wxFont* CreateNormalFont();
-extern wxFont* CreateSmallFont();
-
 const wxFont* wxStockGDIMac::GetFont(Item item)
 {
     wxFont* font = static_cast<wxFont*>(ms_stockObject[item]);
 const wxFont* wxStockGDIMac::GetFont(Item item)
 {
     wxFont* font = static_cast<wxFont*>(ms_stockObject[item]);
@@ -61,23 +58,12 @@ const wxFont* wxStockGDIMac::GetFont(Item item)
     {
         switch (item)
         {
     {
         switch (item)
         {
-#if wxOSX_USE_COCOA_OR_CARBON
-        case FONT_NORMAL:
-            font = new wxFont;
-            font->MacCreateFromThemeFont(kThemeSystemFont);
-            break;
-        case FONT_SMALL:
-            font = new wxFont;
-            font->MacCreateFromThemeFont(kThemeSmallSystemFont);
-            break;
-#else
         case FONT_NORMAL:
         case FONT_NORMAL:
-            font = CreateNormalFont() ; 
+            font = new wxFont(wxOSX_SYSTEM_FONT_NORMAL);
             break;
         case FONT_SMALL:
             break;
         case FONT_SMALL:
-            font = CreateSmallFont(); 
+            font = new wxFont(wxOSX_SYSTEM_FONT_SMALL);
             break;
             break;
-#endif
         default:
             font = const_cast<wxFont*>(super::GetFont(item));
             break;
         default:
             font = const_cast<wxFont*>(super::GetFont(item));
             break;