Use wxNativeFontInfo ctor instead of manually setting its fields
This will be important when new fields are added to wxNativeFontInfo as the ctor will be extended to initialize them, while this code wouldn't do it. No real changes yet.
This commit is contained in:
@@ -149,8 +149,7 @@ wxFont wxCreateFontFromStockObject(int index)
|
||||
LOGFONT lf;
|
||||
if ( ::GetObject(hFont, sizeof(LOGFONT), &lf) != 0 )
|
||||
{
|
||||
wxNativeFontInfo info;
|
||||
info.lf = lf;
|
||||
wxNativeFontInfo info(lf);
|
||||
font.Create(info);
|
||||
}
|
||||
else
|
||||
@@ -182,8 +181,8 @@ wxFont wxSystemSettingsNative::GetFont(wxSystemFont index)
|
||||
// for most (simple) controls, e.g. buttons and such but other
|
||||
// controls may prefer to use lfStatusFont or lfCaptionFont if it
|
||||
// is more appropriate for them
|
||||
wxNativeFontInfo info;
|
||||
info.lf = wxMSWImpl::GetNonClientMetrics().lfMessageFont;
|
||||
const wxNativeFontInfo
|
||||
info(wxMSWImpl::GetNonClientMetrics().lfMessageFont);
|
||||
gs_fontDefault = new wxFont(info);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user