From 413113fa2f9a7363984ac668b6c44587086d01bd Mon Sep 17 00:00:00 2001 From: Dmitriy Kuminov Date: Mon, 27 Apr 2020 01:13:16 +0300 Subject: [PATCH] styles/mac: Fix missing toolbar separator in unified toolbar mode. --- src/plugins/platforms/cocoa/qcocoawindow.mm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index 69d192b4f5..3a3f056d83 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -1800,8 +1800,12 @@ Posted whenever an NSView object that has attached surfaces (that is, bool QCocoaWindow::testContentBorderAreaPosition(int position) const { + // Substract the title bar height from contentBorderThicknessForEdge (added there in + // #applyContentBorderThickness above) as position is relaive to the content area, + // not to the window frame (which includes the title bar). return isContentView() && m_drawContentBorderGradient && - 0 <= position && position < [m_view.window contentBorderThicknessForEdge:NSMaxYEdge]; + 0 <= position && + position < [m_view.window contentBorderThicknessForEdge:NSMaxYEdge] - m_view.window.frame.size.height; } qreal QCocoaWindow::devicePixelRatio() const -- 2.21.1 (Apple Git-122.3)