Update just the colour, not font, in wxOSX SetForegroundColour()
Calling wxWindow::SetForegroundColour() also changed the window font, which was unexpected and unnecessary. Add a separate peer SetForegroundColour() method and implement it to change just the colour in Cocoa version (and leave unimplemented, just as it was before, for iOS) and use it in wxWindow to avoid the font change.
This commit is contained in:
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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);
|
||||
|
@@ -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,
|
||||
|
Reference in New Issue
Block a user