diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2023-02-15 13:38:48 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2023-02-15 17:14:54 +0100 |
commit | 19fc78e9672f4350a06790a9a0f0edba75244875 (patch) | |
tree | 4828041ce10827986d6291ae4d68513f17a82759 /src/plugins/platforms/cocoa | |
parent | 2af494c93076cd2acf4493501e472147422a7670 (diff) |
Remove QCocoaWindow::setContentBorderThickness
Its only client was QMainWindow, but that use was removed in
3b8b47db6aaeb333f106cff57cc712b01d828302 and replaced with a
call to setContentBorderEnabled.
This effectively reverts 0caaf9966a8e4ea1e83de866020e61fd5ffaec1a.
Pick-to: 6.5
Change-Id: Iaba4d5fd9256632b4a3b935e3fb30d7f5c39851e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoanativeinterface.h | 3 | ||||
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoanativeinterface.mm | 12 | ||||
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoawindow.h | 2 | ||||
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoawindow.mm | 10 |
4 files changed, 1 insertions, 26 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoanativeinterface.h b/src/plugins/platforms/cocoa/qcocoanativeinterface.h index 7f0b05002d..4a0cf11257 100644 --- a/src/plugins/platforms/cocoa/qcocoanativeinterface.h +++ b/src/plugins/platforms/cocoa/qcocoanativeinterface.h @@ -53,9 +53,6 @@ private: // deregisters. static void registerTouchWindow(QWindow *window, bool enable); - // Set the size of the unified title and toolbar area. - static void setContentBorderThickness(QWindow *window, int topThickness, int bottomThickness); - // Set the size for a unified toolbar content border area. // Multiple callers can register areas and the platform plugin // will extend the "unified" area to cover them. diff --git a/src/plugins/platforms/cocoa/qcocoanativeinterface.mm b/src/plugins/platforms/cocoa/qcocoanativeinterface.mm index 80bb504a75..e95a3c0331 100644 --- a/src/plugins/platforms/cocoa/qcocoanativeinterface.mm +++ b/src/plugins/platforms/cocoa/qcocoanativeinterface.mm @@ -65,8 +65,6 @@ QPlatformNativeInterface::NativeResourceForIntegrationFunction QCocoaNativeInter return NativeResourceForIntegrationFunction(QCocoaNativeInterface::registerTouchWindow); if (resource.toLower() == "setembeddedinforeignview") return NativeResourceForIntegrationFunction(QCocoaNativeInterface::setEmbeddedInForeignView); - if (resource.toLower() == "setcontentborderthickness") - return NativeResourceForIntegrationFunction(QCocoaNativeInterface::setContentBorderThickness); if (resource.toLower() == "registercontentborderarea") return NativeResourceForIntegrationFunction(QCocoaNativeInterface::registerContentBorderArea); if (resource.toLower() == "setcontentborderareaenabled") @@ -139,16 +137,6 @@ void QCocoaNativeInterface::registerTouchWindow(QWindow *window, bool enable) cocoaWindow->registerTouch(enable); } -void QCocoaNativeInterface::setContentBorderThickness(QWindow *window, int topThickness, int bottomThickness) -{ - if (!window) - return; - - QCocoaWindow *cocoaWindow = static_cast<QCocoaWindow *>(window->handle()); - if (cocoaWindow) - cocoaWindow->setContentBorderThickness(topThickness, bottomThickness); -} - void QCocoaNativeInterface::registerContentBorderArea(QWindow *window, quintptr identifier, int upper, int lower) { if (!window) diff --git a/src/plugins/platforms/cocoa/qcocoawindow.h b/src/plugins/platforms/cocoa/qcocoawindow.h index 1e625ddb9c..7c1eec6e4a 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.h +++ b/src/plugins/platforms/cocoa/qcocoawindow.h @@ -158,7 +158,7 @@ public: void setWindowCursor(NSCursor *cursor); void registerTouch(bool enable); - void setContentBorderThickness(int topThickness, int bottomThickness); + void registerContentBorderArea(quintptr identifier, int upper, int lower); void setContentBorderAreaEnabled(quintptr identifier, bool enable); void setContentBorderEnabled(bool enable) override; diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index e426f459b1..cb813114ef 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -1832,16 +1832,6 @@ void QCocoaWindow::registerTouch(bool enable) m_view.allowedTouchTypes &= ~NSTouchTypeMaskIndirect; } -void QCocoaWindow::setContentBorderThickness(int topThickness, int bottomThickness) -{ - m_topContentBorderThickness = topThickness; - m_bottomContentBorderThickness = bottomThickness; - bool enable = (topThickness > 0 || bottomThickness > 0); - m_drawContentBorderGradient = enable; - - applyContentBorderThickness(); -} - void QCocoaWindow::registerContentBorderArea(quintptr identifier, int upper, int lower) { m_contentBorderAreas.insert(identifier, BorderRange(identifier, upper, lower)); |