forked from qt-creator/qt-creator
Remove dependency on Qt Mac Extras
Change-Id: Id4d394974e87d7844c02c18f3c98957036503d7f Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -9,7 +9,6 @@ macos {
|
||||
$$PWD/touchbar_mac.mm \
|
||||
$$PWD/touchbar_appdelegate_mac.mm
|
||||
|
||||
QT += macextras
|
||||
LIBS += -framework Foundation -framework AppKit
|
||||
} else {
|
||||
SOURCES += $$PWD/touchbar.cpp
|
||||
|
||||
@@ -29,8 +29,6 @@
|
||||
|
||||
#include <utils/utilsicons.h>
|
||||
|
||||
#include <QtMac>
|
||||
|
||||
#import <AppKit/NSButton.h>
|
||||
#import <AppKit/NSCustomTouchBarItem.h>
|
||||
#import <AppKit/NSImage.h>
|
||||
@@ -145,8 +143,12 @@ static NSImage *iconToTemplateNSImage(const QIcon &icon)
|
||||
{
|
||||
// touch bar icons are max 18-22 pts big. our are always 22 pts big.
|
||||
const QPixmap pixmap = icon.pixmap(22);
|
||||
NSImage *image = QtMac::toNSImage(pixmap);
|
||||
// toNSImage ignores devicePixelRatio, so fixup after the fact
|
||||
|
||||
CGImageRef cgImage = pixmap.toImage().toCGImage();
|
||||
NSImage *image = [[NSImage alloc] initWithCGImage:cgImage size:NSZeroSize];
|
||||
CFRelease(cgImage);
|
||||
|
||||
// The above code ignores devicePixelRatio, so fixup after the fact
|
||||
const CGFloat userWidth = pixmap.width() / pixmap.devicePixelRatio();
|
||||
const CGFloat userHeight = pixmap.height() / pixmap.devicePixelRatio();
|
||||
image.size = CGSizeMake(userWidth, userHeight); // scales the image
|
||||
|
||||
@@ -69,7 +69,6 @@ FORMS += docsettingspage.ui \
|
||||
|
||||
osx {
|
||||
DEFINES += QTC_MAC_NATIVE_HELPVIEWER
|
||||
QT += macextras
|
||||
HEADERS += macwebkithelpviewer.h
|
||||
OBJECTIVE_SOURCES += macwebkithelpviewer.mm
|
||||
LIBS += -framework WebKit -framework AppKit
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
#include <QHelpEngine>
|
||||
#include <QStyle>
|
||||
#include <QTimer>
|
||||
#include <QtMac>
|
||||
#include <QToolTip>
|
||||
#include <QUrl>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
Reference in New Issue
Block a user