Adjust strike-through line position under OS X

It was too high, move it down to make it look better.

Closes #17339.
This commit is contained in:
Daniel Kulp
2016-02-22 02:11:26 +01:00
committed by Vadim Zeitlin
parent eb8f6e0173
commit 38fabf7012

View File

@@ -2275,8 +2275,8 @@ void wxMacCoreGraphicsContext::DoDrawText( const wxString &str, wxDouble x, wxDo
if ( fref->GetStrikethrough() )
{
CGFloat width = CTLineGetTypographicBounds(line, NULL, NULL, NULL);
CGFloat height = CTFontGetSize( font );
CGPoint points[] = { {0.0, height / 2}, {width, height / 2} };
CGFloat height = CTFontGetXHeight( font );
CGPoint points[] = { {0.0, height * 0.6}, {width, height * 0.6} };
CGContextSetStrokeColorWithColor(m_cgContext, col);
CGContextSetShouldAntialias(m_cgContext, false);
CGContextSetLineWidth(m_cgContext, 1.0);