]> git.saurik.com Git - wxWidgets.git/commitdiff
avoiding caret in all textctrls in 10.2
authorStefan Csomor <csomor@advancedconcepts.ch>
Wed, 30 Mar 2005 16:33:37 +0000 (16:33 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Wed, 30 Mar 2005 16:33:37 +0000 (16:33 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33184 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/textctrl.cpp

index 9ebcb555be70b66cfd305da09791e15312e5f19d..df2c65b6026f9bafc9ebdad725562704849b438f 100644 (file)
@@ -1532,24 +1532,28 @@ void wxMacMLTEControl::AdjustCreationAttributes( const wxColour &background, boo
                                         iControlTags, iControlData )) ;
 
     // setting the default font
+    // under 10.2 this causes a visible caret, therefore we avoid it
 
-    Str255 fontName ;
-    SInt16 fontSize ;
-    Style fontStyle ;
-
-    GetThemeFont(kThemeSystemFont , GetApplicationScript() , fontName , &fontSize , &fontStyle ) ;
-
-    TXNTypeAttributes typeAttr[] =
+    if ( UMAGetSystemVersion() >= 0x1030 )
     {
-        {   kTXNQDFontNameAttribute , kTXNQDFontNameAttributeSize , { (void*) fontName } } ,
-        {   kTXNQDFontSizeAttribute , kTXNFontSizeAttributeSize , { (void*) (fontSize << 16) } } ,
-        {   kTXNQDFontStyleAttribute , kTXNQDFontStyleAttributeSize , {  (void*) normal } } ,
-    } ;
+        Str255 fontName ;
+        SInt16 fontSize ;
+        Style fontStyle ;
 
-    verify_noerr( TXNSetTypeAttributes (m_txn, sizeof( typeAttr ) / sizeof(TXNTypeAttributes) , typeAttr,
-          kTXNStartOffset,
-          kTXNEndOffset) );
+        GetThemeFont(kThemeSystemFont , GetApplicationScript() , fontName , &fontSize , &fontStyle ) ;
 
+        TXNTypeAttributes typeAttr[] =
+        {
+            {   kTXNQDFontNameAttribute , kTXNQDFontNameAttributeSize , { (void*) fontName } } ,
+            {   kTXNQDFontSizeAttribute , kTXNFontSizeAttributeSize , { (void*) (fontSize << 16) } } ,
+            {   kTXNQDFontStyleAttribute , kTXNQDFontStyleAttributeSize , {  (void*) normal } } ,
+        } ;
+
+        verify_noerr( TXNSetTypeAttributes (m_txn, sizeof( typeAttr ) / sizeof(TXNTypeAttributes) , typeAttr,
+              kTXNStartOffset,
+              kTXNEndOffset) );
+    }
+    
     if ( m_windowStyle & wxTE_PASSWORD )
     {
         UniChar c = 0xA5 ;