]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/gdicmn.cpp
WinCE fixes from "Viktor Voroshylo" <viktor@voroshylo.com>
[wxWidgets.git] / src / common / gdicmn.cpp
index bed3f972ebd97c275fe0bf4f33cd76b6c4c40d61..01273b854b44b5bed8dd3edd36cf9e069cecaf15 100644 (file)
@@ -332,7 +332,6 @@ void wxColourDatabase::Initialize()
         {wxT("WHITE"), 255, 255, 255},
         {wxT("YELLOW"), 255, 255, 0},
         {wxT("YELLOW GREEN"), 153, 204, 50},
-        {wxT("YELLOW GREEN"), 153, 204, 50}
     };
 
     size_t n;
@@ -408,11 +407,9 @@ wxColour wxColourDatabase::Find(const wxString& colour) const
     if ( it != m_map->end() )
         return *(it->second);
 
-    // if we didn't find it,query the system, maybe it knows about it
-    //
-    // TODO: move this into platform-specific files
-#ifdef __WXGTK__
-    wxColour col( colour );
+    // if we didn't find it, query the system, maybe it knows about it
+#if defined(__WXGTK__) || defined(__X__)
+    wxColour col = wxColour::CreateByName(colour);
 
     if ( col.Ok() )
     {
@@ -422,6 +419,7 @@ wxColour wxColourDatabase::Find(const wxString& colour) const
 
     return col;
 #elif defined(__X__)
+    // TODO: move this to wxColour::CreateByName()
     XColor xcolour;
 
 #ifdef __WXMOTIF__