diff options
author | Andy Shaw <andy.shaw@qt.io> | 2019-03-29 00:29:00 +0100 |
---|---|---|
committer | Andy Shaw <andy.shaw@qt.io> | 2019-04-01 13:10:55 +0000 |
commit | 6ccbe7ffdfee0a69ba50d22f577075b1d8cb0b04 (patch) | |
tree | af4a647a0f3693fc608bdabd526740665863a0f2 /src/plugins/styles/mac/qmacstyle_mac.mm | |
parent | 3b7db8ac90ba36949cb4168f07cc8dace47758a7 (diff) |
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>
Diffstat (limited to 'src/plugins/styles/mac/qmacstyle_mac.mm')
-rw-r--r-- | src/plugins/styles/mac/qmacstyle_mac.mm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/styles/mac/qmacstyle_mac.mm b/src/plugins/styles/mac/qmacstyle_mac.mm index 9a11c4d818..fd006b1ca3 100644 --- a/src/plugins/styles/mac/qmacstyle_mac.mm +++ b/src/plugins/styles/mac/qmacstyle_mac.mm @@ -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 { |