]> git.saurik.com Git - wxWidgets.git/commitdiff
wxMac: Fixed wxListCtrl to respect items' non-default fonts.
authorVáclav Slavík <vslavik@fastmail.fm>
Sun, 2 Mar 2008 10:59:58 +0000 (10:59 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sun, 2 Mar 2008 10:59:58 +0000 (10:59 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52247 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/listctrl_mac.cpp

index f3ad7d37e2e253fa7a42d97b1a3c91d5bf0f6f52..f25737c1afac10e786a55978599393f3f2113898 100644 (file)
@@ -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() ) ;