* $Id$
*/
+#include <QApplication>
#include <QDialogButtonBox>
#include <QFont>
+#include <QIcon>
#include <QLabel>
#include <QMessageBox>
#include <QPixmap>
QVBoxLayout * v = new QVBoxLayout (this);
l = new QLabel;
- l->setPixmap (QPixmap (QString::fromUtf8 (":/icons/transmission-48.png")));
+ l->setPixmap (QApplication::windowIcon ().pixmap (48));
l->setAlignment (Qt::AlignCenter);
v->addWidget (l);
Formatter::initUnits ();
// set the default icon
- QIcon icon;
- QList<int> sizes;
- sizes << 16 << 22 << 24 << 32 << 48 << 64 << 72 << 96 << 128 << 192 << 256;
- foreach (int size, sizes)
- icon.addPixmap (QPixmap (QString::fromUtf8 (":/icons/transmission-%1.png").arg (size)));
+ QIcon icon = QIcon::fromTheme ("transmission");
+ if (icon.isNull ())
+ {
+ QList<int> sizes;
+ sizes << 16 << 22 << 24 << 32 << 48 << 64 << 72 << 96 << 128 << 192 << 256;
+ foreach (int size, sizes)
+ icon.addPixmap (QPixmap (QString::fromUtf8 (":/icons/transmission-%1.png").arg (size)));
+ }
setWindowIcon (icon);
// parse the command-line arguments
#include <QtGui>
#include <QCheckBox>
+#include <QIcon>
#include <QProxyStyle>
#include <QLabel>
#include <QFileDialog>
menu->addSeparator ();
menu->addAction (ui.action_Quit);
myTrayIcon.setContextMenu (menu);
- myTrayIcon.setIcon (QApplication::windowIcon ());
+ myTrayIcon.setIcon (QIcon::fromTheme ("transmission-tray-icon", QApplication::windowIcon ()));
connect (&myPrefs, SIGNAL (changed (int)), this, SLOT (refreshPref (int)));
connect (ui.action_ShowMainWindow, SIGNAL (triggered (bool)), this, SLOT (toggleWindows (bool)));