1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Merge branch 'pr1682'

This commit is contained in:
tux3 2015-05-18 23:10:54 +02:00
commit eda513b6cf
No known key found for this signature in database
GPG Key ID: 7E086DD661263264
2 changed files with 1 additions and 18 deletions

View File

@ -4,8 +4,6 @@
#include <QMenu>
#include <QFile>
#include <QDebug>
#include <QPainter>
#include <QBitmap>
#include "src/misc/settings.h"
SystemTrayIcon::SystemTrayIcon()
@ -390,16 +388,6 @@ void SystemTrayIcon::setIcon(QIcon &icon)
#endif
else if (backendType == SystrayBackendType::Qt)
{
#ifdef Q_OS_MAC
// Since Qt doesn't render SVG tray icons for OSX
// we are forced to do this sort of a workaround!
QPixmap quirk(64, 64);
quirk.fill(Qt::transparent);
QPainter quirker(&quirk);
icon.paint(&quirker, 0, 0, 64, 64);
icon = QIcon(quirk);
#endif
qtIcon->setIcon(icon);
}
}

View File

@ -301,7 +301,7 @@ void Widget::updateIcons()
if (ico.isNull())
{
QString color = Settings::getInstance().getLightTrayIcon() ? "light" : "dark";
ico = QIcon(":/img/taskbar/" + color + "/taskbar_" + status + ".svg");
ico = QIcon(":img/taskbar/" + color + "/taskbar_" + status + ".svg");
}
setWindowIcon(ico);
@ -491,11 +491,6 @@ void Widget::onIconClick(QSystemTrayIcon::ActivationReason reason)
{
case QSystemTrayIcon::Trigger:
{
#if defined(Q_OS_MAC)
// We don't want to raise/minimize a window on icon click in OS X
break;
#endif
if (isHidden())
{
show();