X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5100cabffa34c38db26884577113d01f21cda446..4a377e137527eb7f4a26b9e3bc1cd88e8c108676:/src/common/gdicmn.cpp diff --git a/src/common/gdicmn.cpp b/src/common/gdicmn.cpp index e7dc5831e0..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); @@ -691,6 +707,13 @@ wxSize wxGetDisplaySize() return wxSize(x, y); } +wxSize wxGetDisplaySizeMM() +{ + int x, y; + wxDisplaySizeMM(& x, & y); + return wxSize(x, y); +} + wxResourceCache::~wxResourceCache () { wxNode *node = First ();