summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2021-06-10 23:30:31 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-06-11 07:40:40 +0000
commit91ce796159636bbd588b408d67013234b2cd0c43 (patch)
tree633acdee683b940e3bf535a668dac0de827e4c90 /src
parent0f6a9fdc2f1a20d590e51bbc3eee93c2ffeb1850 (diff)
macOS: close visible gap between tab bar base line and tabs
Dock widgets enable the QTabBar::drawBase property, but the clip region left a gap of 3 pixels on each side between the base line and the tabs. Correct the size of the hole cut into the clip region accordingly. Visually tested on macOS 10.15.7 and macOS 11.2.1 using the dockwidgets and tabdialog example. As a drive-by, fix a spelling mistake in related documentation. Fixes: QTBUG-86362 Change-Id: Iada027999467741d0590576ee4508e6f41fb056d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit f5d6f8dca0c45f311b19731128a495392884ec8c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/styles/mac/qmacstyle_mac.mm2
-rw-r--r--src/widgets/widgets/qtabbar.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/styles/mac/qmacstyle_mac.mm b/src/plugins/styles/mac/qmacstyle_mac.mm
index 54e40945af..62d58bca25 100644
--- a/src/plugins/styles/mac/qmacstyle_mac.mm
+++ b/src/plugins/styles/mac/qmacstyle_mac.mm
@@ -3036,7 +3036,7 @@ void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPai
}
#if QT_CONFIG(tabwidget)
QRegion region(tbb->rect);
- region -= tbb->tabBarRect;
+ region -= tbb->tabBarRect.adjusted(3, 0, -3, 0);
p->save();
p->setClipRegion(region);
QStyleOptionTabWidgetFrame twf;
diff --git a/src/widgets/widgets/qtabbar.cpp b/src/widgets/widgets/qtabbar.cpp
index 1621356c40..2738afcbdc 100644
--- a/src/widgets/widgets/qtabbar.cpp
+++ b/src/widgets/widgets/qtabbar.cpp
@@ -919,7 +919,7 @@ void QTabBar::setShape(Shape shape)
\property QTabBar::drawBase
\brief defines whether or not tab bar should draw its base.
- If true then QTabBar draws a base in relation to the styles overlab.
+ If true then QTabBar draws a base in relation to the styles overlap.
Otherwise only the tabs are drawn.
\sa QStyle::pixelMetric(), QStyle::PM_TabBarBaseOverlap, QStyleOptionTabBarBase