GODT-1113: Fix tray icon size on macOS Big Sur.

Add patched libqcocoa based on Qt 5.13.0
This commit is contained in:
Alexander Bilyak
2021-04-12 15:33:00 +02:00
committed by Jakub Cuth
parent ba1dfb1bf4
commit 8db89a1a6c
4 changed files with 16 additions and 0 deletions

View File

@ -165,6 +165,7 @@ THERECIPE_ENV:=github.com/therecipe/env_${TARGET_OS}_amd64_513
# therecipe/env in order to download it only once
vendor-cache/${THERECIPE_ENV}:
git clone https://${THERECIPE_ENV}.git vendor-cache/${THERECIPE_ENV}
if [ "${TARGET_OS}" == "darwin" ]; then cp -f "./utils/QTBUG-88600/libqcocoa.dylib" "./vendor-cache/${THERECIPE_ENV}/5.13.0/clang_64/plugins/platforms/"; fi;
# The command used to make symlinks is different on windows.
# So if the GOOS is windows and we aren't crossbuilding (in which case the host os would still be *nix)

View File

@ -0,0 +1,3 @@
This is version of libqcocoa obtained from original Qt 5.13.0 source available at https://github.com/qt/qtbase with patch from cocoa.patch applyed.
Please refer to https://bugreports.qt.io/browse/QTBUG-88600 for patch origin and https://doc.qt.io/qt-5/macos-building.html for instructions how to build Qt from source.

View File

@ -0,0 +1,12 @@
diff --git a/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm b/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm
index 4982f5ee05..3ae1e4fca3 100644
--- a/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm
+++ b/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm
@@ -224,6 +224,7 @@ void QCocoaSystemTrayIcon::updateIcon(const QIcon &icon)
r.moveCenter(fullHeightPixmap.rect().center());
p.drawPixmap(r, pixmap);
}
+ fullHeightPixmap.setDevicePixelRatio(devicePixelRatio);
NSImage *nsimage = static_cast<NSImage *>(qt_mac_create_nsimage(fullHeightPixmap));
[nsimage setTemplate:icon.isMask()];

BIN
utils/QTBUG-88600/libqcocoa.dylib Executable file

Binary file not shown.