Merge branch 'tm_fix_fonts_on_win'
This commit is contained in:
commit
ddeac631c4
1 changed files with 2 additions and 5 deletions
|
@ -134,11 +134,8 @@ wxFont get_default_font_for_dpi(int dpi)
|
||||||
NONCLIENTMETRICS nm;
|
NONCLIENTMETRICS nm;
|
||||||
memset(&nm, 0, sizeof(NONCLIENTMETRICS));
|
memset(&nm, 0, sizeof(NONCLIENTMETRICS));
|
||||||
nm.cbSize = sizeof(NONCLIENTMETRICS);
|
nm.cbSize = sizeof(NONCLIENTMETRICS);
|
||||||
if (SystemParametersInfoForDpi_fn(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &nm, 0, dpi)) {
|
if (SystemParametersInfoForDpi_fn(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &nm, 0, dpi))
|
||||||
wxNativeFontInfo info;
|
return wxFont(wxNativeFontInfo(nm.lfMessageFont));
|
||||||
info.lf = nm.lfMessageFont;
|
|
||||||
return wxFont(info);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// Then try to guesstimate the font DPI scaling on Windows 8.
|
// Then try to guesstimate the font DPI scaling on Windows 8.
|
||||||
// Let's hope that the font returned by the SystemParametersInfo(), which is used by wxWidgets internally, makes sense.
|
// Let's hope that the font returned by the SystemParametersInfo(), which is used by wxWidgets internally, makes sense.
|
||||||
|
|
Loading…
Reference in a new issue