]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/settings.mm
Allow customization of the locations where persistent settings are stored.
[wxWidgets.git] / src / cocoa / settings.mm
index 618486478b1fcd62956e27628a76ab1e417badef..0f6ffb05f02b908a2b9dc49b48717a2edb91b399 100644 (file)
 
 #ifndef WX_PRECOMP
     #include "wx/utils.h"
 
 #ifndef WX_PRECOMP
     #include "wx/utils.h"
+    #include "wx/gdicmn.h"
 #endif
 
 #endif
 
-#include "wx/gdicmn.h"
-
 #include "wx/cocoa/autorelease.h"
 #include "wx/cocoa/autorelease.h"
+#include "wx/cocoa/private/fontfactory.h"
 
 #import <AppKit/NSColor.h>
 
 #import <AppKit/NSColor.h>
+#import <AppKit/NSFont.h>
 
 // ----------------------------------------------------------------------------
 // wxSystemSettingsNative
 
 // ----------------------------------------------------------------------------
 // wxSystemSettingsNative
@@ -107,8 +108,10 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
 
 wxFont wxSystemSettingsNative::GetFont(wxSystemFont 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 :
     switch (index)
     {
         case wxSYS_ANSI_VAR_FONT :