From 38fabf7012e88235e41f64abbff40d10bd24a4b9 Mon Sep 17 00:00:00 2001 From: Daniel Kulp Date: Mon, 22 Feb 2016 02:11:26 +0100 Subject: [PATCH] Adjust strike-through line position under OS X It was too high, move it down to make it look better. Closes #17339. --- src/osx/carbon/graphics.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osx/carbon/graphics.cpp b/src/osx/carbon/graphics.cpp index 92b3400784..15d1818e85 100644 --- a/src/osx/carbon/graphics.cpp +++ b/src/osx/carbon/graphics.cpp @@ -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);