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:
committed by
Vadim Zeitlin
parent
eb8f6e0173
commit
38fabf7012
@@ -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);
|
||||
|
Reference in New Issue
Block a user