Reuse wxNativeFontInfo::GetLogFontHeightAtPPI()

Instead of calling ::MulDiv() directly, reuse GetLogFontHeightAtPPI()
as it is more readable.
This commit is contained in:
Vadim Zeitlin 2018-12-30 23:54:32 +01:00
parent de6d7472a2
commit 69586bb03b

View File

@ -3124,7 +3124,7 @@ bool wxTextCtrl::GetStyle(long position, wxTextAttr& style)
// Convert the height from the units of 1/20th of the point in which
// CHARFORMAT stores it to pixel-based units used by LOGFONT.
const wxCoord ppi = wxClientDC(this).GetPPI().y;
lf.lfHeight = -MulDiv(cf.yHeight/20, ppi, 72);
lf.lfHeight = wxNativeFontInfo::GetLogFontHeightAtPPI(cf.yHeight/20.0f, ppi);
lf.lfWidth = 0;
lf.lfCharSet = ANSI_CHARSET; // FIXME: how to get correct charset?
lf.lfClipPrecision = 0;