X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/904a68b6f648fc7802b41a8d176c78394252a4b7..237c5c02427fe15b0f7c5ed87a4b582d5b069c8e:/src/common/gdicmn.cpp diff --git a/src/common/gdicmn.cpp b/src/common/gdicmn.cpp index cdce7ecaba..d9431063ef 100644 --- a/src/common/gdicmn.cpp +++ b/src/common/gdicmn.cpp @@ -136,6 +136,9 @@ wxColourDatabase::~wxColourDatabase () delete col; node = next; } +#ifdef __WXPM__ + delete [] m_palTable; +#endif } // Colour database stuff @@ -225,11 +228,22 @@ void wxColourDatabase::Initialize () {wxT("MEDIUM GREY"), 100, 100, 100}, }; - for ( size_t n = 0; n < WXSIZEOF(wxColourTable); n++ ) + size_t n; + + for ( n = 0; n < WXSIZEOF(wxColourTable); n++ ) { const wxColourDesc& cc = wxColourTable[n]; Append(cc.name, new wxColour(cc.r,cc.g,cc.b)); } +#ifdef __WXPM__ + m_palTable = new long[n]; + for ( n = 0; n < WXSIZEOF(wxColourTable); n++ ) + { + const wxColourDesc& cc = wxColourTable[n]; + m_palTable[n] = OS2RGB(cc.r,cc.g,cc.b); + } + m_nSize = n; +#endif } /* @@ -365,13 +379,15 @@ void wxInitializeStockObjects () #ifdef __WXMSW__ static const int sizeFont = 10; #else - static const int sizeFont = 12; #endif */ - -// wxNORMAL_FONT = new wxFont (sizeFont, wxMODERN, wxNORMAL, wxNORMAL); +#if defined(__WXPM__) + static const int sizeFont = 12; + wxNORMAL_FONT = new wxFont (sizeFont, wxMODERN, wxNORMAL, wxNORMAL); +#else wxNORMAL_FONT = new wxFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT)); static const int sizeFont = wxNORMAL_FONT->GetPointSize(); +#endif wxSMALL_FONT = new wxFont (sizeFont - 2, wxSWISS, wxNORMAL, wxNORMAL); wxITALIC_FONT = new wxFont (sizeFont, wxROMAN, wxITALIC, wxNORMAL);