X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4e69ff22681b5625f52c2b4c7e47c1815df7c306..19311d4e7c43a3f6243bf805c164fd76cada0386:/src/mac/carbon/fontdlgosx.mm?ds=sidebyside diff --git a/src/mac/carbon/fontdlgosx.mm b/src/mac/carbon/fontdlgosx.mm index 7bc885bd3c..baf8975be2 100644 --- a/src/mac/carbon/fontdlgosx.mm +++ b/src/mac/carbon/fontdlgosx.mm @@ -17,23 +17,10 @@ // headers // --------------------------------------------------------------------------- -#ifdef __GNUG__ -#pragma implementation "fontdlg.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ - #pragma hdrstop -#endif - -#ifndef WX_PRECOMP - #include "wx/cmndata.h" - #include "wx/fontdlg.h" - #include "wx/fontutil.h" - #include "wx/log.h" -#endif +#include "wx/cmndata.h" +#include "wx/fontdlg.h" +#include "wx/fontutil.h" +#include "wx/log.h" // ============================================================================ // implementation @@ -222,18 +209,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