macOS: Fix tab button rendering issue
This fixes rendering artifacts for the specific case of the first unselected vertical (west) tab button in a tab bar. The popup button gets drawn at the beginning of the tab bar instead of translated to the actual location of the tab. Fixes: QTBUG-76385 Change-Id: I17112c56eabacf34e470314d4cc6b263ba632ec1 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This commit is contained in:
parent
a3dec41cf1
commit
4d9375020c
@ -3944,6 +3944,7 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
|
|||||||
CGContextScaleCTM(ctx, -1, 1);
|
CGContextScaleCTM(ctx, -1, 1);
|
||||||
CGContextTranslateCTM(ctx, -frameRect.left(), 0);
|
CGContextTranslateCTM(ctx, -frameRect.left(), 0);
|
||||||
} else if (tabDirection == QMacStylePrivate::West && tp == QStyleOptionTab::Beginning) {
|
} else if (tabDirection == QMacStylePrivate::West && tp == QStyleOptionTab::Beginning) {
|
||||||
|
CGContextTranslateCTM(ctx, 0, opt->rect.top());
|
||||||
CGContextScaleCTM(ctx, 1, -1);
|
CGContextScaleCTM(ctx, 1, -1);
|
||||||
CGContextTranslateCTM(ctx, 0, -frameRect.right());
|
CGContextTranslateCTM(ctx, 0, -frameRect.right());
|
||||||
} else if (tabDirection == QMacStylePrivate::East && tp == QStyleOptionTab::End) {
|
} else if (tabDirection == QMacStylePrivate::East && tp == QStyleOptionTab::End) {
|
||||||
|
Loading…
Reference in New Issue
Block a user