X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7266b6723573ce6317577226cb1e5d32826e24e8..2e7b0a1617dbdada26531371627a1cd8a72e9149:/src/common/gdicmn.cpp?ds=sidebyside diff --git a/src/common/gdicmn.cpp b/src/common/gdicmn.cpp index 2210dc3485..48cd85ace6 100644 --- a/src/common/gdicmn.cpp +++ b/src/common/gdicmn.cpp @@ -381,10 +381,16 @@ wxColour *wxColourDatabase::FindColour(const wxString& colour) if (!XParseColor(display, (Colormap) wxTheApp->GetMainColormap((WXDisplay*) display), colour,&xcolour)) return NULL; +#if wxUSE_NANOX + unsigned char r = (unsigned char)(xcolour.red); + unsigned char g = (unsigned char)(xcolour.green); + unsigned char b = (unsigned char)(xcolour.blue); +#else unsigned char r = (unsigned char)(xcolour.red >> 8); unsigned char g = (unsigned char)(xcolour.green >> 8); unsigned char b = (unsigned char)(xcolour.blue >> 8); - +#endif + wxColour *col = new wxColour(r, g, b); Append(colour, col);