X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2229243bdf17485b33c15786124ab99366b83975..129b8b1a215fc1fcc1b9f06daa0aeaf22bbce614:/src/generic/fontdlgg.cpp diff --git a/src/generic/fontdlgg.cpp b/src/generic/fontdlgg.cpp index 175954049b..66191c4993 100644 --- a/src/generic/fontdlgg.cpp +++ b/src/generic/fontdlgg.cpp @@ -79,13 +79,10 @@ void wxFontPreviewer::OnPaint(wxPaintEvent& WXUNUSED(event)) if ( font.Ok() ) { dc.SetFont(font); - // Calculate vertical centre - long w = 0, h = 0; - dc.GetTextExtent( wxT("X"), &w, &h); dc.SetTextForeground(GetForegroundColour()); dc.SetClippingRegion(2, 2, size.x-4, size.y-4); dc.DrawText(_("ABCDEFGabcdefg12345"), - 10, size.y/2 - h/2); + 10, (size.y - dc.GetTextExtent(wxT("X")).y)/2); dc.DestroyClippingRegion(); } }