]> git.saurik.com Git - wxWidgets.git/commitdiff
fixing 10.5 only compiles
authorStefan Csomor <csomor@advancedconcepts.ch>
Fri, 30 Nov 2007 10:54:54 +0000 (10:54 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Fri, 30 Nov 2007 10:54:54 +0000 (10:54 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50344 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/utils.cpp

index 2ad859c32db6746caf6b007e5cf154efc54a1b6a..b91247bfd521e441e1f8be6421f19533e313f241 100644 (file)
@@ -643,7 +643,29 @@ void wxMacControl::SuperChangedPosition()
 void wxMacControl::SetFont( const wxFont & font , const wxColour& foreground , long windowStyle )
 {
     m_font = font;
-#ifndef __LP64__
+#if wxMAC_USE_CORE_TEXT
+    if ( UMAGetSystemVersion() >= 0x1050 )
+    {
+        HIViewPartCode part = 0;
+        HIThemeTextHorizontalFlush flush = kHIThemeTextHorizontalFlushDefault;
+        if ( ( windowStyle & wxALIGN_MASK ) & wxALIGN_CENTER_HORIZONTAL )
+            flush = kHIThemeTextHorizontalFlushCenter;
+        else if ( ( windowStyle & wxALIGN_MASK ) & wxALIGN_RIGHT )
+            flush = kHIThemeTextHorizontalFlushRight;
+        HIViewSetTextFont( m_controlRef , part , (CTFontRef) font.MacGetCTFont() );
+        HIViewSetTextHorizontalFlush( m_controlRef, part, flush );
+        
+        if ( foreground != *wxBLACK )
+        {
+            ControlFontStyleRec fontStyle;
+            foreground.GetRGBColor( &fontStyle.foreColor );
+            fontStyle.flags = kControlUseForeColorMask;
+            ::SetControlFontStyle( m_controlRef , &fontStyle );
+        }
+        
+    }
+#endif
+#if wxMAC_USE_ATSU_TEXT
     ControlFontStyleRec fontStyle;
     if ( font.MacGetThemeFontID() != kThemeCurrentPortFont )
     {