This commit is contained in:
bubnikv 2020-05-04 16:18:32 +02:00
commit 0e87226ac9
2 changed files with 3 additions and 5 deletions

View file

@ -19,6 +19,7 @@ prusaslicer_add_cmake_project(wxWidgets
-DwxBUILD_PRECOMP=ON
${_wx_toolkit}
"-DCMAKE_DEBUG_POSTFIX:STRING="
-DwxBUILD_DEBUG_LEVEL=0
-DwxUSE_DETECT_SM=OFF
-DwxUSE_UNICODE=ON
-DwxUSE_OPENGL=ON

View file

@ -134,11 +134,8 @@ wxFont get_default_font_for_dpi(int dpi)
NONCLIENTMETRICS nm;
memset(&nm, 0, sizeof(NONCLIENTMETRICS));
nm.cbSize = sizeof(NONCLIENTMETRICS);
if (SystemParametersInfoForDpi_fn(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &nm, 0, dpi)) {
wxNativeFontInfo info;
info.lf = nm.lfMessageFont;
return wxFont(info);
}
if (SystemParametersInfoForDpi_fn(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &nm, 0, dpi))
return wxFont(wxNativeFontInfo(nm.lfMessageFont));
}
// 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.