diff options
Diffstat (limited to 'lineedit.go')
-rw-r--r-- | lineedit.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lineedit.go b/lineedit.go index da4c1251..7016bdc7 100644 --- a/lineedit.go +++ b/lineedit.go @@ -270,7 +270,6 @@ func (le *LineEdit) sizeHintForLimit(limit int) (size Size) { } func (le *LineEdit) initCharWidth() { - font := le.Font() if font == le.charWidthFont { return @@ -285,7 +284,7 @@ func (le *LineEdit) initCharWidth() { } defer win.ReleaseDC(le.hWnd, hdc) - defer win.SelectObject(hdc, win.SelectObject(hdc, win.HGDIOBJ(font.handleForDPI(0)))) + defer win.SelectObject(hdc, win.SelectObject(hdc, win.HGDIOBJ(font.handleForDPI(le.DPI())))) buf := []uint16{'M'} |