Reworked wxSystemColourProperty::StringToValue() to use wxColour::Set() instead of doing string-to-colour conversion by itself. This adds support for HTML-colours, among other things (closes #12696).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66217 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2010-11-20 11:58:54 +00:00
parent a90e69f70f
commit 780cccd730
2 changed files with 33 additions and 41 deletions

View File

@@ -752,6 +752,16 @@ bool FormMain::RunTests( bool fullTest, bool interactive )
wxLogDebug("Did not match: Car.Convertible=%s", pgman->GetPropertyValueAsString("Car.Convertible").c_str());
RT_FAILURE();
}
// SetPropertyValueString for special cases such as wxColour
pgman->SetPropertyValueString("ColourProperty", "(123,4,255)");
col << pgman->GetPropertyValue("ColourProperty");
if ( col != wxColour(123, 4, 255) )
RT_FAILURE();
pgman->SetPropertyValueString("ColourProperty", "#FE860B");
col << pgman->GetPropertyValue("ColourProperty");
if ( col != wxColour(254, 134, 11) )
RT_FAILURE();
}
{