]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/settings.mm
Fix recreating of wxBitmapComboBox using untyped client data.
[wxWidgets.git] / src / cocoa / settings.mm
index 192911f6826f57b4f859b0b35b97aedc1440c76b..ea351f78311cf2cab552e2eb11c679f51282d10c 100644 (file)
@@ -4,23 +4,24 @@
 // Author:      David Elliott
 // Modified by:
 // Created:     2005/01/11
-// RCS-ID:      $Id$
 // Copyright:   (c) 2005 David Elliott
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #include "wx/wxprec.h"
 
+#include "wx/settings.h"
+
 #ifndef WX_PRECOMP
     #include "wx/utils.h"
+    #include "wx/gdicmn.h"
 #endif
 
-#include "wx/settings.h"
-#include "wx/gdicmn.h"
-
 #include "wx/cocoa/autorelease.h"
+#include "wx/cocoa/private/fontfactory.h"
 
 #import <AppKit/NSColor.h>
+#import <AppKit/NSFont.h>
 
 // ----------------------------------------------------------------------------
 // wxSystemSettingsNative
@@ -106,8 +107,10 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
 
 wxFont wxSystemSettingsNative::GetFont(wxSystemFont index)
 {
-// return a nonworking font object, crash from wxInitializeStockObjects
-    return wxFont();
+    // Return the system font for now
+    {   wxAutoNSAutoreleasePool pool;
+        return wxCocoaFontFactory::InstanceForNSFont([NSFont systemFontOfSize:0.0], false);
+    }
     switch (index)
     {
         case wxSYS_ANSI_VAR_FONT :