From: Stefan Csomor Date: Sun, 9 Jan 2005 05:58:58 +0000 (+0000) Subject: draw the focus rect ourselves X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/eda3f2b454f3af6ac6d44620738114fb5d55d803 draw the focus rect ourselves git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31298 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/textctrl.cpp b/src/mac/carbon/textctrl.cpp index b85c0b9abd..6cfe85a324 100644 --- a/src/mac/carbon/textctrl.cpp +++ b/src/mac/carbon/textctrl.cpp @@ -300,6 +300,7 @@ public : const wxSize& size, long style ) ; ~wxMacMLTEClassicControl() ; virtual void VisibilityChanged(bool shown) ; + virtual bool NeedsFocusRect() const; protected : OSStatus DoCreate(); public : @@ -1527,7 +1528,7 @@ void wxMacMLTEControl::TXNSetAttribute( const wxTextAttr& style , long from , lo fontStyle |= bold ; if ( font.GetStyle() == wxITALIC ) fontStyle |= italic ; - + typeAttr[attrCounter].tag = kTXNQDFontNameAttribute ; typeAttr[attrCounter].size = kTXNQDFontNameAttributeSize ; typeAttr[attrCounter].data.dataPtr = (void*) fontName ; @@ -2067,7 +2068,7 @@ static void TPRedrawFocusOutline(STPTextPaneVars *varsp) { if (varsp->fFocusDrawState != (varsp->fIsActive && varsp->fInFocus)) { varsp->fFocusDrawState = (varsp->fIsActive && varsp->fInFocus); - DrawThemeFocusRect(&varsp->fRFocusOutline, varsp->fFocusDrawState); + // DrawThemeFocusRect(&varsp->fRFocusOutline, varsp->fFocusDrawState); } } @@ -2411,6 +2412,11 @@ void wxMacMLTEClassicControl::VisibilityChanged(bool shown) InvalWindowRect( GetControlOwner( m_controlRef ) , &((STPTextPaneVars *)m_macTXNvars)->fRBounds ) ; } +bool wxMacMLTEClassicControl::NeedsFocusRect() const +{ + return true; +} + OSStatus wxMacMLTEClassicControl::DoCreate() { Rect bounds;