Avoid infinite recursion between wxStockGDI and wxSystemSettions
There was a possible recursion from wxStockGDI::GetFont to wxSystemSettings::GetFont and back, resolve by using direct font creation, adding fixed system font.
This commit is contained in:
parent
7be80a858d
commit
74bc9b5f71
@ -26,7 +26,8 @@ enum wxOSXSystemFont
|
||||
wxOSX_SYSTEM_FONT_MINI,
|
||||
wxOSX_SYSTEM_FONT_MINI_BOLD,
|
||||
wxOSX_SYSTEM_FONT_LABELS,
|
||||
wxOSX_SYSTEM_FONT_VIEWS
|
||||
wxOSX_SYSTEM_FONT_VIEWS,
|
||||
wxOSX_SYSTEM_FONT_FIXED
|
||||
};
|
||||
|
||||
|
||||
|
@ -473,6 +473,8 @@ wxFont::wxFont(wxOSXSystemFont font)
|
||||
case wxOSX_SYSTEM_FONT_VIEWS:
|
||||
uifont = kCTFontViewsFontType;
|
||||
break;
|
||||
case wxOSX_SYSTEM_FONT_FIXED:
|
||||
uifont = kCTFontUIFontUserFixedPitch;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -205,7 +205,7 @@ wxFont wxSystemSettingsNative::GetFont(wxSystemFont index)
|
||||
case wxSYS_DEVICE_DEFAULT_FONT :
|
||||
case wxSYS_DEFAULT_GUI_FONT :
|
||||
{
|
||||
return *wxSMALL_FONT ;
|
||||
return wxFont(wxOSX_SYSTEM_FONT_SMALL) ;
|
||||
} ;
|
||||
break ;
|
||||
case wxSYS_OEM_FIXED_FONT :
|
||||
@ -213,7 +213,7 @@ wxFont wxSystemSettingsNative::GetFont(wxSystemFont index)
|
||||
case wxSYS_SYSTEM_FIXED_FONT :
|
||||
default :
|
||||
{
|
||||
return *wxNORMAL_FONT ;
|
||||
return wxFont(wxOSX_SYSTEM_FONT_FIXED) ;
|
||||
} ;
|
||||
break ;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user