From: Stefan Csomor Date: Wed, 30 Mar 2005 16:33:37 +0000 (+0000) Subject: avoiding caret in all textctrls in 10.2 X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/8e15e610d1de7f4216c0ee33ef84627c15edb559 avoiding caret in all textctrls in 10.2 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33184 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/textctrl.cpp b/src/mac/carbon/textctrl.cpp index 9ebcb555be..df2c65b602 100644 --- a/src/mac/carbon/textctrl.cpp +++ b/src/mac/carbon/textctrl.cpp @@ -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 ;