fixed font-matching bug in wxFontList::FindOrCreateFont for wxGTK when
font family is wxDEFAULT. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3082 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -90,13 +90,13 @@ bool wxRect::operator==(const wxRect& rect) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
const wxRect& wxRect::operator += (const wxRect& rect)
|
const wxRect& wxRect::operator += (const wxRect& rect)
|
||||||
{
|
{
|
||||||
*this = (*this + rect);
|
*this = (*this + rect);
|
||||||
return ( *this ) ;
|
return ( *this ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxRect wxRect::operator + (const wxRect& rect) const
|
wxRect wxRect::operator + (const wxRect& rect) const
|
||||||
{
|
{
|
||||||
int x1 = wxMin(this->x, rect.x);
|
int x1 = wxMin(this->x, rect.x);
|
||||||
int y1 = wxMin(this->y, rect.y);
|
int y1 = wxMin(this->y, rect.y);
|
||||||
int y2 = wxMax(y+height, rect.height+rect.y);
|
int y2 = wxMax(y+height, rect.height+rect.y);
|
||||||
@@ -595,7 +595,12 @@ wxFont *wxFontList::
|
|||||||
//#if defined(__X__)
|
//#if defined(__X__)
|
||||||
// each_font->GetFontId () == FamilyOrFontId) /* New font system */
|
// each_font->GetFontId () == FamilyOrFontId) /* New font system */
|
||||||
//#else
|
//#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))
|
((each_font->GetFaceName() == _T("")) || each_font->GetFaceName() == Face))
|
||||||
//#endif
|
//#endif
|
||||||
return each_font;
|
return each_font;
|
||||||
|
Reference in New Issue
Block a user