Avoid changing checkbox background in wxGrid under non-MSW
Doing this makes the checkbox unusable with the default GTK 3 theme as the default grid background colour (white) is the same as the colour of the check mark -- so changing the checkbox background to it makes it invisible. Work around this by adding a new SetTransparentPartColour() method that can be used by wxGrid (and, in the future, user code if we decide that this is really the best solution to this problem that we can provide) to make the checkbox blend in with its background without actually changing its appearance.
This commit is contained in:
@@ -45,6 +45,11 @@ public:
|
||||
// override some base class virtuals
|
||||
virtual void SetLabel(const wxString& label) wxOVERRIDE;
|
||||
|
||||
virtual void SetTransparentPartColour(const wxColour& col) wxOVERRIDE
|
||||
{
|
||||
SetBackgroundColour(col);
|
||||
}
|
||||
|
||||
virtual bool MSWCommand(WXUINT param, WXWORD id) wxOVERRIDE;
|
||||
virtual void Command(wxCommandEvent& event) wxOVERRIDE;
|
||||
|
||||
|
Reference in New Issue
Block a user