From 4d9375020c59282b447aad5189c2adb12931e4a1 Mon Sep 17 00:00:00 2001 From: Jason Haslam Date: Tue, 18 Jun 2019 11:51:38 -0600 Subject: 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 --- src/plugins/styles/mac/qmacstyle_mac.mm | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/plugins/styles/mac/qmacstyle_mac.mm b/src/plugins/styles/mac/qmacstyle_mac.mm index 1ff1c22788..07651fc206 100644 --- a/src/plugins/styles/mac/qmacstyle_mac.mm +++ b/src/plugins/styles/mac/qmacstyle_mac.mm @@ -3944,6 +3944,7 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter CGContextScaleCTM(ctx, -1, 1); CGContextTranslateCTM(ctx, -frameRect.left(), 0); } else if (tabDirection == QMacStylePrivate::West && tp == QStyleOptionTab::Beginning) { + CGContextTranslateCTM(ctx, 0, opt->rect.top()); CGContextScaleCTM(ctx, 1, -1); CGContextTranslateCTM(ctx, 0, -frameRect.right()); } else if (tabDirection == QMacStylePrivate::East && tp == QStyleOptionTab::End) { -- cgit v1.2.3