Set wxPG cell background colour as wxPGComboBox background colour

Default wxGenericComboCtrl background colour is obtained under wxGTK
with wxComboBox::GetClassDefaultAttributes(). For wxGTK 3 returned colour
is fully transparent (00000000) which can cause problems with
proper drawing of controls deriving from wxGenericComboCtrl, like
wxPGComboBox which in turn is used by wxEnumProperty, wxCursorProperty,
etc.
wxPGComboBox should have background with the same colour as the cell
so we can explicitly set background colour to avoid using default one.

Closes #17986.
This commit is contained in:
Artur Wieczorek 2017-11-12 22:05:59 +01:00
parent 7592595252
commit 4df04a88c5

View File

@ -1072,6 +1072,8 @@ wxWindow* wxPGChoiceEditor::CreateControlsBase( wxPropertyGrid* propGrid,
#endif // !__WXOSX__
cb->SetMargins(wxPG_XBEFORETEXT-1);
cb->SetBackgroundColour(propGrid->GetCellBackgroundColour());
// Set hint text
cb->SetHint(property->GetHintText());