Applied patch [ 1204244 ] [wxMSW] Use Win2K look (MS Shell Dlg 2) if possible
Adam Strzelecki git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34242 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -606,8 +606,16 @@ void wxNativeFontInfo::SetFamily(wxFontFamily family)
|
||||
|
||||
case wxDEFAULT:
|
||||
default:
|
||||
{
|
||||
// We want Windows 2000 or later to have new fonts even MS Shell Dlg
|
||||
// is returned as default GUI font for compatibility
|
||||
int verMaj;
|
||||
ff_family = FF_SWISS;
|
||||
facename = _T("MS Sans Serif");
|
||||
if(wxGetOsVersion(&verMaj) == wxWINDOWS_NT && verMaj >= 5)
|
||||
facename = _T("MS Shell Dlg 2");
|
||||
else
|
||||
facename = _T("MS Shell Dlg");
|
||||
}
|
||||
}
|
||||
|
||||
lf.lfPitchAndFamily = (BYTE)(DEFAULT_PITCH) | ff_family;
|
||||
|
@@ -225,6 +225,12 @@ wxFont wxCreateFontFromStockObject(int index)
|
||||
{
|
||||
wxNativeFontInfo info;
|
||||
info.lf = lf;
|
||||
// We want Windows 2000 or later to have new fonts even MS Shell Dlg
|
||||
// is returned as default GUI font for compatibility
|
||||
int verMaj;
|
||||
if(index == DEFAULT_GUI_FONT && wxGetOsVersion(&verMaj) == wxWINDOWS_NT && verMaj >= 5)
|
||||
wxStrcpy(info.lf.lfFaceName, wxT("MS Shell Dlg 2"));
|
||||
|
||||
// Under MicroWindows we pass the HFONT as well
|
||||
// because it's hard to convert HFONT -> LOGFONT -> HFONT
|
||||
// It's OK to delete stock objects, the delete will be ignored.
|
||||
|
Reference in New Issue
Block a user