macOS: When a menu item has an italic font it should respect this

Change-Id: Id8d2c5c0d0407ead66700d38634f342f489a2842
Fixes: QTBUG-69489
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
Andy Shaw 2019-03-29 00:29:00 +01:00
parent 3b7db8ac90
commit 6ccbe7ffdf

View File

@ -4323,7 +4323,8 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
d->setupNSGraphicsContext(cgCtx, YES);
[s.toNSString() drawInRect:textRect
withAttributes:@{ NSFontAttributeName:f, NSForegroundColorAttributeName:c }];
withAttributes:@{ NSFontAttributeName:f, NSForegroundColorAttributeName:c,
NSObliquenessAttributeName: [NSNumber numberWithDouble: myFont.italic() ? 0.3 : 0.0]}];
d->restoreNSGraphicsContext(cgCtx);
} else {