diff --git a/RsyncUI.pro.user b/RsyncUI.pro.user index 4ba88eb..798c730 100644 --- a/RsyncUI.pro.user +++ b/RsyncUI.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId diff --git a/mainwindow.cpp b/mainwindow.cpp index 0e7c371..98257c9 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -100,8 +100,6 @@ MainWindow::MainWindow(QWidget *parent) config.UnitCombobox->addItems({tr("KB"), tr("MB"), tr("GB"), tr("TB"), tr("PB")}); initSystemTrayIcon(); - - } void MainWindow::init() @@ -137,9 +135,11 @@ void MainWindow::initSystemTrayIcon() { QMenu *trayIconMenu; QAction * quitAction; + QIcon icon; + icon.addFile(this->icon); this->trayIcon = new QSystemTrayIcon; - this->trayIcon->setIcon(this->windowIcon()); + this->trayIcon->setIcon(icon); quitAction = new QAction(tr("&Quit"), this); connect(quitAction, &QAction::triggered, this, &MainWindow::quitApp); diff --git a/mainwindow.h b/mainwindow.h index e856786..b447ade 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -105,6 +105,7 @@ class MainWindow : public QMainWindow Ui::windowAbout AboutW; std::vector serversList; QSystemTrayIcon * trayIcon; + QString icon = "/usr/share/icons/RsyncUI.png"; QList bwUnitText { "KB", "MB",