qt patch updated, os x tray icon fixed

This commit is contained in:
John Preston 2016-02-07 13:10:35 +03:00
parent c240295a74
commit dd0c79ee56
1 changed files with 24 additions and 16 deletions

View File

@ -282,7 +282,7 @@ index 112bb8e..45be6c6 100644
+ } + }
+ } + }
+ } + }
+ +
+ families << family; + families << family;
} }
populateFromPattern(pattern); populateFromPattern(pattern);
@ -1149,7 +1149,7 @@ new file mode 100644
index 0000000..b47d332 index 0000000..b47d332
--- /dev/null --- /dev/null
+++ b/src/plugins/platforminputcontexts/fcitx/fcitxqtinputcontextproxy.cpp +++ b/src/plugins/platforminputcontexts/fcitx/fcitxqtinputcontextproxy.cpp
@@ -0,0 +1,25 @@ @@ -0,0 +1,26 @@
+/* +/*
+ * This file was generated by qdbusxml2cpp version 0.8 + * This file was generated by qdbusxml2cpp version 0.8
+ * Command line was: qdbusxml2cpp -N -p fcitxqtinputcontextproxy -c FcitxQtInputContextProxy interfaces/org.fcitx.Fcitx.InputContext.xml -i fcitxqtformattedpreedit.h -i fcitxqt_export.h + * Command line was: qdbusxml2cpp -N -p fcitxqtinputcontextproxy -c FcitxQtInputContextProxy interfaces/org.fcitx.Fcitx.InputContext.xml -i fcitxqtformattedpreedit.h -i fcitxqt_export.h
@ -1175,6 +1175,7 @@ index 0000000..b47d332
+FcitxQtInputContextProxy::~FcitxQtInputContextProxy() +FcitxQtInputContextProxy::~FcitxQtInputContextProxy()
+{ +{
+} +}
+
diff --git a/src/plugins/platforminputcontexts/fcitx/fcitxqtinputcontextproxy.h b/src/plugins/platforminputcontexts/fcitx/fcitxqtinputcontextproxy.h diff --git a/src/plugins/platforminputcontexts/fcitx/fcitxqtinputcontextproxy.h b/src/plugins/platforminputcontexts/fcitx/fcitxqtinputcontextproxy.h
new file mode 100644 new file mode 100644
index 0000000..19874dc index 0000000..19874dc
@ -1493,7 +1494,7 @@ new file mode 100644
index 0000000..068f4c2 index 0000000..068f4c2
--- /dev/null --- /dev/null
+++ b/src/plugins/platforminputcontexts/fcitx/fcitxqtinputmethodproxy.cpp +++ b/src/plugins/platforminputcontexts/fcitx/fcitxqtinputmethodproxy.cpp
@@ -0,0 +1,25 @@ @@ -0,0 +1,26 @@
+/* +/*
+ * This file was generated by qdbusxml2cpp version 0.8 + * This file was generated by qdbusxml2cpp version 0.8
+ * Command line was: qdbusxml2cpp -N -p fcitxqtinputmethodproxy -c FcitxQtInputMethodProxy interfaces/org.fcitx.Fcitx.InputMethod.xml -i fcitxqtinputmethoditem.h -i fcitxqt_export.h + * Command line was: qdbusxml2cpp -N -p fcitxqtinputmethodproxy -c FcitxQtInputMethodProxy interfaces/org.fcitx.Fcitx.InputMethod.xml -i fcitxqtinputmethoditem.h -i fcitxqt_export.h
@ -1519,6 +1520,7 @@ index 0000000..068f4c2
+FcitxQtInputMethodProxy::~FcitxQtInputMethodProxy() +FcitxQtInputMethodProxy::~FcitxQtInputMethodProxy()
+{ +{
+} +}
+
diff --git a/src/plugins/platforminputcontexts/fcitx/fcitxqtinputmethodproxy.h b/src/plugins/platforminputcontexts/fcitx/fcitxqtinputmethodproxy.h diff --git a/src/plugins/platforminputcontexts/fcitx/fcitxqtinputmethodproxy.h b/src/plugins/platforminputcontexts/fcitx/fcitxqtinputmethodproxy.h
new file mode 100644 new file mode 100644
index 0000000..7aa37e2 index 0000000..7aa37e2
@ -1917,7 +1919,7 @@ new file mode 100644
index 0000000..7523a92 index 0000000..7523a92
--- /dev/null --- /dev/null
+++ b/src/plugins/platforminputcontexts/fcitx/fcitxqtkeyboardproxy.cpp +++ b/src/plugins/platforminputcontexts/fcitx/fcitxqtkeyboardproxy.cpp
@@ -0,0 +1,25 @@ @@ -0,0 +1,26 @@
+/* +/*
+ * This file was generated by qdbusxml2cpp version 0.8 + * This file was generated by qdbusxml2cpp version 0.8
+ * Command line was: qdbusxml2cpp -N -p fcitxqtkeyboardproxy -c FcitxQtKeyboardProxy interfaces/org.fcitx.Fcitx.Keyboard.xml -i fcitxqtkeyboardlayout.h -i fcitxqt_export.h + * Command line was: qdbusxml2cpp -N -p fcitxqtkeyboardproxy -c FcitxQtKeyboardProxy interfaces/org.fcitx.Fcitx.Keyboard.xml -i fcitxqtkeyboardlayout.h -i fcitxqt_export.h
@ -1943,6 +1945,7 @@ index 0000000..7523a92
+FcitxQtKeyboardProxy::~FcitxQtKeyboardProxy() +FcitxQtKeyboardProxy::~FcitxQtKeyboardProxy()
+{ +{
+} +}
+
diff --git a/src/plugins/platforminputcontexts/fcitx/fcitxqtkeyboardproxy.h b/src/plugins/platforminputcontexts/fcitx/fcitxqtkeyboardproxy.h diff --git a/src/plugins/platforminputcontexts/fcitx/fcitxqtkeyboardproxy.h b/src/plugins/platforminputcontexts/fcitx/fcitxqtkeyboardproxy.h
new file mode 100644 new file mode 100644
index 0000000..42a6561 index 0000000..42a6561
@ -11201,7 +11204,7 @@ index ca92103..f681b08 100644
p.setCompositionMode(QPainter::CompositionMode_Source); p.setCompositionMode(QPainter::CompositionMode_Source);
const QVector<QRect> rects = region.rects(); const QVector<QRect> rects = region.rects();
diff --git a/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm b/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm diff --git a/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm b/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm
index 713758c..9a509b2 100755 index 713758c..9b23ca2 100755
--- a/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm --- a/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm
+++ b/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm +++ b/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm
@@ -94,6 +94,8 @@ QT_USE_NAMESPACE @@ -94,6 +94,8 @@ QT_USE_NAMESPACE
@ -11213,17 +11216,22 @@ index 713758c..9a509b2 100755
QIcon icon; QIcon icon;
QT_MANGLE_NAMESPACE(QNSImageView) *imageCell; QT_MANGLE_NAMESPACE(QNSImageView) *imageCell;
} }
@@ -197,7 +199,8 @@ void QCocoaSystemTrayIcon::updateIcon(const QIcon &icon) @@ -197,8 +199,12 @@ void QCocoaSystemTrayIcon::updateIcon(const QIcon &icon)
// (device independent pixels). The menu height on past and // (device independent pixels). The menu height on past and
// current OS X versions is 22 points. Provide some future-proofing // current OS X versions is 22 points. Provide some future-proofing
// by deriving the icon height from the menu height. // by deriving the icon height from the menu height.
- const int padding = 4; - const int padding = 4;
- const int menuHeight = [[[NSApplication sharedApplication] mainMenu] menuBarHeight];
+ // create a good os x tray icon + // create a good os x tray icon
+ const int padding = 0; + const int padding = 0;
const int menuHeight = [[[NSApplication sharedApplication] mainMenu] menuBarHeight]; + int menuHeight = [[[NSApplication sharedApplication] mainMenu] menuBarHeight];
+ if (menuHeight <= 0) {
+ menuHeight = 22;
+ }
const int maxImageHeight = menuHeight - padding; const int maxImageHeight = menuHeight - padding;
@@ -207,8 +210,11 @@ void QCocoaSystemTrayIcon::updateIcon(const QIcon &icon) // Select pixmap based on the device pixel height. Ideally we would use
@@ -207,8 +213,11 @@ void QCocoaSystemTrayIcon::updateIcon(const QIcon &icon)
// devicePixelRatio for the "best" screen on the system. // devicePixelRatio for the "best" screen on the system.
qreal devicePixelRatio = qApp->devicePixelRatio(); qreal devicePixelRatio = qApp->devicePixelRatio();
const int maxPixmapHeight = maxImageHeight * devicePixelRatio; const int maxPixmapHeight = maxImageHeight * devicePixelRatio;
@ -11236,7 +11244,7 @@ index 713758c..9a509b2 100755
// Select a pixmap based on the height. We want the largest pixmap // Select a pixmap based on the height. We want the largest pixmap
// with a height smaller or equal to maxPixmapHeight. The pixmap // with a height smaller or equal to maxPixmapHeight. The pixmap
// may rectangular; assume it has a reasonable size. If there is // may rectangular; assume it has a reasonable size. If there is
@@ -224,9 +230,11 @@ void QCocoaSystemTrayIcon::updateIcon(const QIcon &icon) @@ -224,9 +233,11 @@ void QCocoaSystemTrayIcon::updateIcon(const QIcon &icon)
// Handle SVG icons, which do not return anything for availableSizes(). // Handle SVG icons, which do not return anything for availableSizes().
if (!selectedSize.isValid()) if (!selectedSize.isValid())
@ -11250,7 +11258,7 @@ index 713758c..9a509b2 100755
// Draw a low-resolution icon if there is not enough pixels for a retina // Draw a low-resolution icon if there is not enough pixels for a retina
// icon. This prevents showing a small icon on retina displays. // icon. This prevents showing a small icon on retina displays.
@@ -373,6 +381,11 @@ QT_END_NAMESPACE @@ -373,6 +384,11 @@ QT_END_NAMESPACE
Q_UNUSED(notification); Q_UNUSED(notification);
down = NO; down = NO;
@ -11262,7 +11270,7 @@ index 713758c..9a509b2 100755
[self setNeedsDisplay:YES]; [self setNeedsDisplay:YES];
} }
@@ -382,6 +395,10 @@ QT_END_NAMESPACE @@ -382,6 +398,10 @@ QT_END_NAMESPACE
int clickCount = [mouseEvent clickCount]; int clickCount = [mouseEvent clickCount];
[self setNeedsDisplay:YES]; [self setNeedsDisplay:YES];
@ -11273,7 +11281,7 @@ index 713758c..9a509b2 100755
if (clickCount == 2) { if (clickCount == 2) {
[self menuTrackingDone:nil]; [self menuTrackingDone:nil];
[parent doubleClickSelector:self]; [parent doubleClickSelector:self];
@@ -398,6 +415,11 @@ QT_END_NAMESPACE @@ -398,6 +418,11 @@ QT_END_NAMESPACE
-(void)mouseUp:(NSEvent *)mouseEvent -(void)mouseUp:(NSEvent *)mouseEvent
{ {
Q_UNUSED(mouseEvent); Q_UNUSED(mouseEvent);
@ -11285,7 +11293,7 @@ index 713758c..9a509b2 100755
[self menuTrackingDone:nil]; [self menuTrackingDone:nil];
} }
@@ -409,6 +431,11 @@ QT_END_NAMESPACE @@ -409,6 +434,11 @@ QT_END_NAMESPACE
-(void)rightMouseUp:(NSEvent *)mouseEvent -(void)rightMouseUp:(NSEvent *)mouseEvent
{ {
Q_UNUSED(mouseEvent); Q_UNUSED(mouseEvent);
@ -11297,7 +11305,7 @@ index 713758c..9a509b2 100755
[self menuTrackingDone:nil]; [self menuTrackingDone:nil];
} }
@@ -424,7 +451,8 @@ QT_END_NAMESPACE @@ -424,7 +454,8 @@ QT_END_NAMESPACE
} }
-(void)drawRect:(NSRect)rect { -(void)drawRect:(NSRect)rect {
@ -11307,7 +11315,7 @@ index 713758c..9a509b2 100755
[super drawRect:rect]; [super drawRect:rect];
} }
@end @end
@@ -436,7 +464,9 @@ QT_END_NAMESPACE @@ -436,7 +467,9 @@ QT_END_NAMESPACE
self = [super init]; self = [super init];
if (self) { if (self) {
item = [[[NSStatusBar systemStatusBar] statusItemWithLength:NSSquareStatusItemLength] retain]; item = [[[NSStatusBar systemStatusBar] statusItemWithLength:NSSquareStatusItemLength] retain];
@ -11317,7 +11325,7 @@ index 713758c..9a509b2 100755
systray = sys; systray = sys;
imageCell = [[QNSImageView alloc] initWithParent:self]; imageCell = [[QNSImageView alloc] initWithParent:self];
[item setView: imageCell]; [item setView: imageCell];
@@ -481,6 +511,8 @@ QT_END_NAMESPACE @@ -481,6 +514,8 @@ QT_END_NAMESPACE
selector:@selector(menuTrackingDone:) selector:@selector(menuTrackingDone:)
name:NSMenuDidEndTrackingNotification name:NSMenuDidEndTrackingNotification
object:m]; object:m];