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:
parent
9e68df224f
commit
58c94d9ec0
7 changed files with 10 additions and 35 deletions
|
|
@ -301,8 +301,7 @@ public :
|
|||
virtual void SetNeedsDisplay( const wxRect* where = NULL ) = 0;
|
||||
virtual bool GetNeedsDisplay() const = 0;
|
||||
|
||||
virtual bool NeedsFocusRect() const;
|
||||
virtual void SetNeedsFocusRect( bool needs );
|
||||
virtual void EnableFocusRing(bool WXUNUSED(enabled)) {}
|
||||
|
||||
virtual bool NeedsFrame() const;
|
||||
virtual void SetNeedsFrame( bool needs );
|
||||
|
|
@ -598,7 +597,6 @@ protected :
|
|||
bool m_wantsUserKey;
|
||||
bool m_wantsUserMouse;
|
||||
wxWindowMac* m_wxPeer;
|
||||
bool m_needsFocusRect;
|
||||
bool m_needsFrame;
|
||||
bool m_shouldSendEvents;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue