X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dcb44466c13262aad45c82f13373069dac8ba932..ae8f57691329af997e274a3fce5b25c5e5f00f2f:/src/common/gdicmn.cpp diff --git a/src/common/gdicmn.cpp b/src/common/gdicmn.cpp index a55bd47e58..7755f181e1 100644 --- a/src/common/gdicmn.cpp +++ b/src/common/gdicmn.cpp @@ -31,6 +31,7 @@ #include "wx/palette.h" #include "wx/app.h" #include "wx/dc.h" +#include "wx/utils.h" #include "wx/log.h" #include @@ -89,17 +90,17 @@ bool wxRect::operator==(const wxRect& rect) const } const wxRect& wxRect::operator += (const wxRect& rect) -{ - *this = (*this + rect); +{ + *this = (*this + rect); return ( *this ) ; } wxRect wxRect::operator + (const wxRect& rect) const -{ - int x1 = min(this->x, rect.x); - int y1 = min(this->y, rect.y); - int y2 = max(y+height, rect.height+rect.y); - int x2 = max(x+width, rect.width+rect.x); +{ + int x1 = wxMin(this->x, rect.x); + int y1 = wxMin(this->y, rect.y); + int y2 = wxMax(y+height, rect.height+rect.y); + int x2 = wxMax(x+width, rect.width+rect.x); return wxRect(x1, y1, x2-x1, y2-y1); } @@ -255,6 +256,9 @@ wxColour *wxColourDatabase::FindColour(const wxString& colour) #ifdef __WXMSW__ else return NULL; #endif +#ifdef __WXPM__ + else return NULL; +#endif // TODO for other implementations. This should really go into // platform-specific directories. @@ -594,7 +598,12 @@ wxFont *wxFontList:: //#if defined(__X__) // each_font->GetFontId () == FamilyOrFontId) /* New font system */ //#else - each_font->GetFamily () == FamilyOrFontId && +#if defined(__WXGTK__) + (each_font->GetFamily() == FamilyOrFontId || + (each_font->GetFamily() == wxSWISS && FamilyOrFontId == wxDEFAULT)) && +#else + each_font->GetFamily() == FamilyOrFontId && +#endif ((each_font->GetFaceName() == _T("")) || each_font->GetFaceName() == Face)) //#endif return each_font;