macOS: respect strikeout attribute in menu item fonts
When we draw menu item text with CoreText instead of QPainter, then we need to translate QFont::strikeOut() explicitly to an entry in the attribute dictionary. Task-number: QTBUG-136215 Change-Id: Ic4a895cd10c950c477acffca0078718490f4f0b7 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
395451e15f
commit
3fbdb31420
@ -4289,7 +4289,9 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
|
||||
withAttributes:@{ NSFontAttributeName:f, NSForegroundColorAttributeName:c,
|
||||
NSObliquenessAttributeName: [NSNumber numberWithDouble: myFont.italic() ? 0.3 : 0.0],
|
||||
NSUnderlineStyleAttributeName: [NSNumber numberWithInt: myFont.underline() ? NSUnderlineStyleSingle
|
||||
: NSUnderlineStyleNone]}];
|
||||
: NSUnderlineStyleNone],
|
||||
NSStrikethroughStyleAttributeName: [NSNumber numberWithInt: myFont.strikeOut() ? NSUnderlineStyleSingle
|
||||
: NSUnderlineStyleNone]}];
|
||||
|
||||
d->restoreNSGraphicsContext(cgCtx);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user