Draw wxTextCtrl focus ring natively on Mac
NSTextView doesn't display focus ring by default, which is why wxOSX did draw it manually, but this behavior can be overriden since OS X 10.3 with NSView.focusRingType property. The HITheme-based rendering suffered from a number of non-nativeness issues: - didn't respect macOS 10.14+ accent colors - not animated as the native focus ring - subtly different shape of the outline - noticeably different outline shape on macOS 11 Remove NeedsFocusRect() and associated workaround for manually drawing focus ring inside NSTextView (i.e. multiline text controls). This private interface was only used for wxTextCtrl and nothing else, so this shouldn't have any impact elsewhere.
This commit is contained in:
@@ -111,6 +111,8 @@ public :
|
||||
virtual void SetNeedsDisplay( const wxRect* where = NULL ) wxOVERRIDE;
|
||||
virtual bool GetNeedsDisplay() const wxOVERRIDE;
|
||||
|
||||
virtual void EnableFocusRing(bool enabled) wxOVERRIDE;
|
||||
|
||||
virtual void SetDrawingEnabled(bool enabled) wxOVERRIDE;
|
||||
|
||||
virtual bool CanFocus() const wxOVERRIDE;
|
||||
|
Reference in New Issue
Block a user