X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6fe190576ec9fd93bd0f1eb35539077bce864309..4fa0a5b44341885a0886f2ae6723d2441bd1f62f:/src/msw/fontdlg.cpp?ds=inline diff --git a/src/msw/fontdlg.cpp b/src/msw/fontdlg.cpp index c9eed41aee..b15e0adcbd 100644 --- a/src/msw/fontdlg.cpp +++ b/src/msw/fontdlg.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: fontdlg.cpp +// Name: src/msw/fontdlg.cpp // Purpose: wxFontDialog class // Author: Julian Smart // Modified by: @@ -28,6 +28,8 @@ #pragma hdrstop #endif +#if wxUSE_FONTDLG + #ifndef WX_PRECOMP #include "wx/defs.h" #include "wx/utils.h" @@ -103,7 +105,13 @@ int wxFontDialog::ShowModal() wxFillLogFont(&logFont, &m_fontData.initialFont); } - chooseFontStruct.rgbColors = wxColourToRGB(m_fontData.fontColour); + if ( m_fontData.fontColour.Ok() ) + { + chooseFontStruct.rgbColors = wxColourToRGB(m_fontData.fontColour); + + // need this for the colour to be taken into account + flags |= CF_EFFECTS; + } // CF_ANSIONLY flag is obsolete for Win32 if ( !m_fontData.GetAllowSymbols() ) @@ -156,3 +164,5 @@ int wxFontDialog::ShowModal() return wxID_CANCEL; } } + +#endif // wxUSE_FONTDLG