From 26c7a01f1d015d8d59fe91466dee5baf1bd5b712 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 25 Oct 2013 17:51:16 +0000 Subject: [PATCH] Remove wxPropertyGrid colours not recognized by wxColour. Don't use colour names which can't be used to successfully initialize wxColour. This is not the best solution, we probably should add these names to the colour database instead, but for now it's better than getting errors when trying to use these colours for colour properties in wxPropertyGrid. See #15597. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75066 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/propgrid/advprops.cpp | 34 ++++++++-------------------------- 1 file changed, 8 insertions(+), 26 deletions(-) diff --git a/src/propgrid/advprops.cpp b/src/propgrid/advprops.cpp index 4e1592ac4d..4dc1956222 100644 --- a/src/propgrid/advprops.cpp +++ b/src/propgrid/advprops.cpp @@ -1518,46 +1518,28 @@ bool wxSystemColourProperty::DoSetAttribute( const wxString& name, wxVariant& va static const wxChar* const gs_cp_es_normcolour_labels[] = { wxT("Black"), - wxT("Maroon"), - wxT("Navy"), - wxT("Purple"), - wxT("Teal"), - wxT("Gray"), - wxT("Green"), - wxT("Olive"), - wxT("Brown"), - wxT("Blue"), - wxT("Fuchsia"), wxT("Red"), - wxT("Orange"), - wxT("Silver"), - wxT("Lime"), - wxT("Aqua"), + wxT("Green"), + wxT("Blue"), + wxT("Cyan"), + wxT("Magenta"), wxT("Yellow"), wxT("White"), + wxT("Grey"), wxT("Custom"), (const wxChar*) NULL }; static const unsigned long gs_cp_es_normcolour_colours[] = { wxPG_COLOUR(0,0,0), - wxPG_COLOUR(128,0,0), - wxPG_COLOUR(0,0,128), - wxPG_COLOUR(128,0,128), - wxPG_COLOUR(0,128,128), - wxPG_COLOUR(128,128,128), - wxPG_COLOUR(0,128,0), - wxPG_COLOUR(128,128,0), - wxPG_COLOUR(166,124,81), - wxPG_COLOUR(0,0,255), - wxPG_COLOUR(255,0,255), wxPG_COLOUR(255,0,0), - wxPG_COLOUR(247,148,28), - wxPG_COLOUR(192,192,192), wxPG_COLOUR(0,255,0), + wxPG_COLOUR(0,0,255), wxPG_COLOUR(0,255,255), + wxPG_COLOUR(255,0,255), wxPG_COLOUR(255,255,0), wxPG_COLOUR(255,255,255), + wxPG_COLOUR(128,128,128), wxPG_COLOUR(0,0,0) };