From: Václav Slavík Date: Sun, 2 Mar 2008 10:59:58 +0000 (+0000) Subject: wxMac: Fixed wxListCtrl to respect items' non-default fonts. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/80d72f726da59d59c9eea9ac0adebdd064736936 wxMac: Fixed wxListCtrl to respect items' non-default fonts. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52247 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/listctrl_mac.cpp b/src/mac/carbon/listctrl_mac.cpp index f3ad7d37e2..f25737c1af 100644 --- a/src/mac/carbon/listctrl_mac.cpp +++ b/src/mac/carbon/listctrl_mac.cpp @@ -2712,9 +2712,8 @@ void wxMacDataBrowserListCtrlControl::DrawItem( if (bgColor == wxNullColour) bgColor = listBgColor; - wxFont listFont = list->GetFont(); - if (font == wxNullFont) - font = listFont; + if (!font.Ok()) + font = list->GetFont(); wxCFStringRef cfString( text, wxLocale::GetSystemEncoding() ); @@ -2840,8 +2839,7 @@ void wxMacDataBrowserListCtrlControl::DrawItem( if (font.Ok()) { - if (font.GetFamily() != wxFONTFAMILY_DEFAULT) - info.fontID = font.MacGetThemeFontID(); + info.fontID = font.MacGetThemeFontID(); ::TextSize( (short)(font.MacGetFontSize()) ) ; ::TextFace( font.MacGetFontStyle() ) ;