summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoanativeinterface.h
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@digia.com>2014-01-10 15:41:20 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-09 20:53:06 +0200
commit3876a05adf08b3ab5a921f9c5bf81a22baace93f (patch)
treed881453581ec40630a337cc1aef8ffde53e60829 /src/plugins/platforms/cocoa/qcocoanativeinterface.h
parent0f2acaf1cb6be5290f64842667e60b6675b467c4 (diff)
Mac: Implement unified toolbar look for QTabBar
Extend the unified title and toolbar gradient to tabs in document mode that are adjacent unified tool bars. Change the updateMacBorderMetrics() function to register the tab bar geometry and visibility status with the Cocoa platform plugin. The Cocoa platform plugin will then merge this area with other registered areas if possible. Add QCocoaNativeInterface::testContentBorderPosition(). This function tests whether the given point is within the unified title and toolbar area. Use testContentBorderPosition() in QMacStyle to enable code paths that skips drawing the QToolBar bottom separator line and paints the active tab background with transparent pixels to make the background gradient visible. Change-Id: I2b70f9bb0c2c59af053a691a7df538f958783dab Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoanativeinterface.h')
-rw-r--r--src/plugins/platforms/cocoa/qcocoanativeinterface.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoanativeinterface.h b/src/plugins/platforms/cocoa/qcocoanativeinterface.h
index 0318c52628..54e45a1d99 100644
--- a/src/plugins/platforms/cocoa/qcocoanativeinterface.h
+++ b/src/plugins/platforms/cocoa/qcocoanativeinterface.h
@@ -147,6 +147,10 @@ private:
// Enables or disiables a content border area.
static void setContentBorderAreaEnabled(QWindow *window, quintptr identifier, bool enable);
+ // Returns true if the given coordinate is inside the current
+ // content border.
+ static bool testContentBorderPosition(QWindow *window, int position);
+
// Sets a NSToolbar instance for the given QWindow. The
// toolbar will be attached to the native NSWindow when
// that is created;