From 9c5abea2661598af98cde565bc26a4db9e2af89e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=CC=81clav=20Slavi=CC=81k?= Date: Sun, 30 Aug 2020 18:35:45 +0200 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20add=20non-default=20focus=20rin?= =?UTF-8?q?g=20to=20NSTextView?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit NSTextView does not natively show a focus ring by default, and it is extremely rare thing to do in native applications. Don't do it in wxTextCtrl either. --- src/generic/grideditors.cpp | 4 ---- src/osx/cocoa/textctrl.mm | 1 - 2 files changed, 5 deletions(-) diff --git a/src/generic/grideditors.cpp b/src/generic/grideditors.cpp index b7866e0b57..dc01ce4465 100644 --- a/src/generic/grideditors.cpp +++ b/src/generic/grideditors.cpp @@ -460,10 +460,6 @@ void wxGridCellTextEditor::DoCreate(wxWindow* parent, text->SetMargins(0, 0); m_control = text; -#ifdef __WXOSX__ - wxWidgetImpl* impl = m_control->GetPeer(); - impl->EnableFocusRing(false); -#endif // set max length allowed in the textctrl, if the parameter was set if ( m_maxChars != 0 ) { diff --git a/src/osx/cocoa/textctrl.mm b/src/osx/cocoa/textctrl.mm index 1f3abd2d65..3029096b03 100644 --- a/src/osx/cocoa/textctrl.mm +++ b/src/osx/cocoa/textctrl.mm @@ -1590,7 +1590,6 @@ wxWidgetImplType* wxWidgetImpl::CreateTextControl( wxTextCtrl* wxpeer, v = [[wxNSTextScrollView alloc] initWithFrame:r]; wxNSTextViewControl* t = new wxNSTextViewControl( wxpeer, v, style ); c = t; - c->EnableFocusRing( true ); t->SetStringValue(str); }