Fix the size of the font returned from wxTextCtrl::GetStyle() in wxMSW.
Due to a typo the size was expressed in 1/10th of a point and not in points. Fix this and add a unit test checking that GetStyle() returns the same font as was set by SetStyle(). Closes #2120. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2744,7 +2744,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/2, ppi, 72);
|
||||
lf.lfHeight = -MulDiv(cf.yHeight/20, ppi, 72);
|
||||
lf.lfWidth = 0;
|
||||
lf.lfCharSet = ANSI_CHARSET; // FIXME: how to get correct charset?
|
||||
lf.lfClipPrecision = 0;
|
||||
|
Reference in New Issue
Block a user