]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/fontdlgosx.mm
removed mentions of wxUSE_OWNER_DRAWN: unless I miss something, this doesn't make...
[wxWidgets.git] / src / mac / carbon / fontdlgosx.mm
index 532bde166cafdb11bf6a8f3d5744896a18b65dc8..968d740727d515b71c94f655ddfc0404808551fa 100644 (file)
@@ -29,9 +29,7 @@
 //Mac OSX 10.2+ only
 #if USE_NATIVE_FONT_DIALOG_FOR_MACOSX
 
-#if !USE_SHARED_LIBRARY
 IMPLEMENT_DYNAMIC_CLASS(wxFontDialog, wxDialog)
-#endif
 
 // Cocoa headers
 #include "wx/cocoa/autorelease.h"
@@ -209,18 +207,19 @@ bool wxFontDialog::Create(wxWindow *parent, const wxFontData& data)
             ];
             
         wxASSERT_MSG(theDefaultFont, wxT("Invalid default font for wxCocoaFontDialog!"));
-     
-        //set the initial font of the NSFontPanel 
-        //(the font manager calls the appropriate NSFontPanel method)
-        [[NSFontManager sharedFontManager] setSelectedFont:theDefaultFont isMultiple:NO];
+
+        //Apple docs say to call NSFontManager::setSelectedFont
+        //However, 10.3 doesn't seem to create the font panel
+        //is this is done, so create it ourselves
+        [[NSFontPanel sharedFontPanel] setPanelFont:theDefaultFont isMultiple:NO];
 
     }
 
     if(m_fontData.m_fontColour.Ok())
         [[NSColorPanel sharedColorPanel] setColor:
             [NSColor colorWithCalibratedRed:m_fontData.m_fontColour.Red() / 255.0
-                                        green:m_fontData.m_fontColour.Red() / 255.0
-                                        blue:m_fontData.m_fontColour.Red() / 255.0
+                                        green:m_fontData.m_fontColour.Green() / 255.0
+                                        blue:m_fontData.m_fontColour.Blue() / 255.0
                                         alpha:1.0]
         ];
     else
@@ -264,7 +263,7 @@ int wxFontDialog::ShowModal()
     //
     // So we set up delegates for both the color and font panels,
     //  and the if the font panel opens the color panel, we 
-    //  stop the modal loop, and start a seperate modal loop for
+    //  stop the modal loop, and start a separate modal loop for
     //  the color panel until the color panel closes, switching
     //  back to the font panel modal loop once it does close.
     //