diff --git a/src/generic/fontpickerg.cpp b/src/generic/fontpickerg.cpp index 8d10db960c..78c4c4bb71 100644 --- a/src/generic/fontpickerg.cpp +++ b/src/generic/fontpickerg.cpp @@ -22,6 +22,10 @@ #if wxUSE_FONTPICKERCTRL +#ifndef WX_PRECOMP + #include "wx/settings.h" +#endif // WX_PRECOMP + #include "wx/fontpicker.h" #include "wx/fontdlg.h" @@ -68,7 +72,7 @@ bool wxGenericFontButton::Create( wxWindow *parent, wxWindowID id, void wxGenericFontButton::InitFontData() { m_data.SetAllowSymbols(true); - m_data.SetColour(*wxBLACK); + m_data.SetColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT)); m_data.EnableEffects(true); } diff --git a/tests/controls/pickertest.cpp b/tests/controls/pickertest.cpp index f43badd1c7..1f324966f3 100644 --- a/tests/controls/pickertest.cpp +++ b/tests/controls/pickertest.cpp @@ -208,8 +208,7 @@ void FontPickerCtrlTestCase::ColourSelection() { wxColour selectedColour(0xFF4269UL); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Default font picker color must be black", - m_font->GetSelectedColour(), wxColour(*wxBLACK)); + CHECK( m_font->GetSelectedColour() != selectedColour ); m_font->SetSelectedColour(selectedColour);