X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/99fd0d71f7512aae82da848879258399c0caa9ad..f2d990adc1b8c0e93107eb87df2ab42df849c7fa:/src/common/gdicmn.cpp diff --git a/src/common/gdicmn.cpp b/src/common/gdicmn.cpp index 1aa1b56120..09222b21d4 100644 --- a/src/common/gdicmn.cpp +++ b/src/common/gdicmn.cpp @@ -61,6 +61,7 @@ #ifdef __WXMAC__ #include "wx/mac/private.h" +#include "wx/mac/uma.h" #endif IMPLEMENT_CLASS(wxColourDatabase, wxList) IMPLEMENT_DYNAMIC_CLASS(wxFontList, wxList) @@ -363,7 +364,8 @@ wxColour *wxColourDatabase::FindColour(const wxString& colour) #ifdef __WXGTK__ wxColour *col = new wxColour( colour ); - if (!(col->Ok())) { + if (!(col->Ok())) + { delete col; return (wxColour *) NULL; } @@ -381,7 +383,7 @@ wxColour *wxColourDatabase::FindColour(const wxString& colour) Display* display = (Display*) wxGetDisplay(); #endif /* MATTHEW: [4] Use wxGetMainColormap */ - if (!XParseColor(display, (Colormap) wxTheApp->GetMainColormap((WXDisplay*) display), colour,&xcolour)) + if (!XParseColor(display, (Colormap) wxTheApp->GetMainColormap((WXDisplay*) display), colour.ToAscii() ,&xcolour)) return NULL; #if wxUSE_NANOX @@ -393,7 +395,7 @@ wxColour *wxColourDatabase::FindColour(const wxString& colour) 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); @@ -455,7 +457,6 @@ void wxInitializeStockObjects () #if defined(__WXMAC__) int sizeFont = 12; - FontFamilyID fontId ; Str255 fontName ; SInt16 fontSize ; Style fontStyle ; @@ -476,8 +477,8 @@ void wxInitializeStockObjects () // Basic OS/2 has a fairly limited number of fonts and these are as good // as I can do to get something that looks halfway "wx" normal */ - wxNORMAL_FONT = new wxFont (sizeFont, wxMODERN, wxNORMAL, wxNORMAL); /* System VIO */ - wxSMALL_FONT = new wxFont (sizeFont - 4, wxMODERN, wxNORMAL, wxNORMAL); /* System VIO */ + wxNORMAL_FONT = new wxFont (sizeFont, wxMODERN, wxNORMAL, wxBOLD); + wxSMALL_FONT = new wxFont (sizeFont - 4, wxSWISS, wxNORMAL, wxNORMAL); /* Helv */ wxITALIC_FONT = new wxFont (sizeFont, wxROMAN, wxITALIC, wxNORMAL); wxSWISS_FONT = new wxFont (sizeFont, wxSWISS, wxNORMAL, wxNORMAL); /* Helv */ #elif defined(__WXMAC__)