From 810d800e3ca2da8c032766b548da9496cc102ff4 Mon Sep 17 00:00:00 2001 From: Ryan Norton Date: Sun, 26 Sep 2004 16:34:12 +0000 Subject: [PATCH] fix font styles git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29410 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/fontdlg.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/mac/carbon/fontdlg.cpp b/src/mac/carbon/fontdlg.cpp index 913ee8015b..4485022584 100644 --- a/src/mac/carbon/fontdlg.cpp +++ b/src/mac/carbon/fontdlg.cpp @@ -122,15 +122,13 @@ pascal OSStatus wxFontDialogEventHandler( EventHandlerCallRef inHandlerCallRef, theFont.SetFamily(wxDEFAULT); //TODOTODO: Get other styles? Font weight? - theFont.SetStyle(0 + - ((fontstyle & bold) ? wxFONTFLAG_BOLD : 0) + - ((fontstyle & italic) ? wxFONTFLAG_ITALIC : 0) + - ((fontstyle & underline) ? wxFONTFLAG_UNDERLINED : 0) - ); + theFont.SetStyle(((fontstyle & italic) ? wxFONTSTYLE_ITALIC : 0)); theFont.SetWeight((fontstyle & bold) ? wxBOLD : wxNORMAL); + theFont.SetUnderlined(((fontstyle & underline) ? true : false)); //for debugging - //wxPrintf(wxT("FaceName:%s\nSize:%i\n"), theFont.GetFaceName().c_str(), theFont.GetPointSize()); + //wxPrintf(wxT("FaceName:%s\nSize:%i\nStyle:%i\n"), theFont.GetFaceName().c_str(), theFont.GetPointSize(), + //theFont.GetStyle()); //phew!! We're done - set the chosen font theFontData.SetChosenFont(theFont); -- 2.47.2