Merge branch 'osx-set-color-without-font'

Set colour without changing font in wxOSX.

See https://github.com/wxWidgets/wxWidgets/pull/2278
This commit is contained in:
Vadim Zeitlin
2021-04-04 14:19:39 +02:00
7 changed files with 45 additions and 23 deletions

View File

@@ -101,6 +101,7 @@ public :
virtual void SetBackgroundColour(const wxColour&) wxOVERRIDE;
virtual bool SetBackgroundStyle(wxBackgroundStyle style) wxOVERRIDE;
virtual void SetForegroundColour(const wxColour& col) wxOVERRIDE;
virtual void GetContentArea( int &left, int &top, int &width, int &height ) const wxOVERRIDE;
virtual void Move(int x, int y, int width, int height) wxOVERRIDE;
@@ -241,6 +242,10 @@ protected:
// was the wx event for the current native key down event sent
bool WasKeyDownSent() const;
// Return the view to apply the font/colour to.
NSView* GetViewWithText() const;
NSEvent* m_lastKeyDownEvent;
bool m_lastKeyDownWXSent;
#if !wxOSX_USE_NATIVE_FLIPPED

View File

@@ -276,6 +276,7 @@ public :
virtual void SetBackgroundColour( const wxColour& col ) = 0;
virtual bool SetBackgroundStyle(wxBackgroundStyle style) = 0;
virtual void SetForegroundColour( const wxColour& col ) = 0;
// all coordinates in native parent widget relative coordinates
virtual void GetContentArea( int &left , int &top , int &width , int &height ) const = 0;

View File

@@ -56,6 +56,7 @@ public :
virtual void SetBackgroundColour( const wxColour& col ) ;
virtual bool SetBackgroundStyle(wxBackgroundStyle style) ;
virtual void SetForegroundColour( const wxColour& col ) ;
virtual void GetContentArea( int &left , int &top , int &width , int &height ) const;
virtual void Move(int x, int y, int width, int height);

View File

@@ -342,7 +342,6 @@ protected:
bool MacHasScrollBarCorner() const;
void MacCreateScrollBars( long style ) ;
void MacRepositionScrollBars() ;
void MacUpdateControlFont() ;
// implement the base class pure virtuals
virtual void DoGetTextExtent(const wxString& string,